[FFmpeg-devel] [PATCH] DV: detect another case of broken DV files.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Mar 24 17:14:43 CET 2012


See trac issue #217.
Not sure if this is really a good idea, more samples probably would be
good.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavcodec/dvdata.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c
index 9de1db5..417583b 100644
--- a/libavcodec/dvdata.c
+++ b/libavcodec/dvdata.c
@@ -311,6 +311,10 @@ const DVprofile* avpriv_dv_frame_profile2(AVCodecContext* codec, const DVprofile
     if (sys && buf_size == sys->frame_size)
         return sys;
 
+    /* hack for trac issue #217, dv files created with QuickTime 3 */
+    if (frame[3] == 0xbf && frame[80 * 5 + 48 + 3] == 0xff)
+        return &dv_profiles[1];
+
     return NULL;
 }
 
-- 
1.7.9.1



More information about the ffmpeg-devel mailing list