summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-03-01 08:00:15 -0700
committerJohn Stebbins <[email protected]>2017-03-01 08:00:15 -0700
commita7d96f24f2c8df6b1092d4376c436e6d63514bdb (patch)
tree3e7441c0dde83a617ed731607308a3a8a7e0616e /contrib
parent872aee88cd477d082a36124e83205689999d2527 (diff)
libav: simplify patch for corrupt raw video
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ffmpeg/A17-mkv-rawvideo.patch35
1 files changed, 8 insertions, 27 deletions
diff --git a/contrib/ffmpeg/A17-mkv-rawvideo.patch b/contrib/ffmpeg/A17-mkv-rawvideo.patch
index 69800d6ca..77430fe09 100644
--- a/contrib/ffmpeg/A17-mkv-rawvideo.patch
+++ b/contrib/ffmpeg/A17-mkv-rawvideo.patch
@@ -1,41 +1,22 @@
-From 000203fcadd61329bdf6cb3b25e2b87bd32f7d22 Mon Sep 17 00:00:00 2001
+From 2469f85d5b6d981f891e697dec82e87f169347ba Mon Sep 17 00:00:00 2001
From: John Stebbins <[email protected]>
-Date: Sun, 26 Feb 2017 16:35:31 -0700
-Subject: [PATCH] matroskadec: fix format of AVCodecParameters codec_tag
+Date: Wed, 1 Mar 2017 07:57:44 -0700
+Subject: [PATCH] matroskadec: fix endianness fourcc and codec_tag
-It was byte swapped.
This fixes decode of rawvideo in matroska.
---
- libavformat/matroskadec.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
+ libavformat/matroskadec.c | 1 +
+ 1 file changed, 1 insertion(+)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
-index 4e121b6..edd1749 100644
+index 4e121b6..75cfa85 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
-@@ -123,6 +123,7 @@ typedef struct MatroskaTrackVideo {
- uint64_t pixel_width;
- uint64_t pixel_height;
- uint64_t fourcc;
-+ EbmlBin color_space;
- uint64_t interlaced;
- uint64_t field_order;
- uint64_t stereo_mode;
-@@ -315,7 +316,7 @@ static EbmlSyntax matroska_track_video[] = {
- { MATROSKA_ID_VIDEODISPLAYHEIGHT, EBML_UINT, 0, offsetof(MatroskaTrackVideo, display_height) },
- { MATROSKA_ID_VIDEOPIXELWIDTH, EBML_UINT, 0, offsetof(MatroskaTrackVideo, pixel_width) },
- { MATROSKA_ID_VIDEOPIXELHEIGHT, EBML_UINT, 0, offsetof(MatroskaTrackVideo, pixel_height) },
-- { MATROSKA_ID_VIDEOCOLORSPACE, EBML_UINT, 0, offsetof(MatroskaTrackVideo, fourcc) },
-+ { MATROSKA_ID_VIDEOCOLORSPACE, EBML_BIN, 0, offsetof(MatroskaTrackVideo, color_space) },
- { MATROSKA_ID_VIDEOPIXELCROPB, EBML_NONE },
- { MATROSKA_ID_VIDEOPIXELCROPT, EBML_NONE },
- { MATROSKA_ID_VIDEOPIXELCROPL, EBML_NONE },
-@@ -1612,6 +1613,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
+@@ -1612,6 +1612,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
track->video.display_width = track->video.pixel_width;
if (!track->video.display_height)
track->video.display_height = track->video.pixel_height;
-+ if (track->video.color_space.size == 4)
-+ track->video.fourcc = AV_RL32(track->video.color_space.data);
++ track->video.fourcc = av_bswap32(track->video.fourcc);
} else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
if (!track->audio.out_samplerate)
track->audio.out_samplerate = track->audio.samplerate;