]> git.sesse.net Git - ffmpeg/commitdiff
Only warn about "Invalid and inefficient vfw-avi packed B frames" once.
authorAndrew Savchenko <Bircoph@list.ru>
Tue, 4 Nov 2008 06:54:42 +0000 (06:54 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Tue, 4 Nov 2008 06:54:42 +0000 (06:54 +0000)
Patch by Andrew Savchenko, Bircoph at list dot ru

Originally committed as revision 15772 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h263.c
libavcodec/mpegvideo.h

index 47210e9c9e90fe4e36cf85d7ce72e6a4f3637ae0..f72f4403482495a6eae1c3cd96deeb7f0742a331 100644 (file)
@@ -5751,8 +5751,10 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
         s->divx_version= ver;
         s->divx_build= build;
         s->divx_packed= e==3 && last=='p';
-        if(s->divx_packed)
+        if(s->divx_packed && !s->showed_packed_warning) {
             av_log(s->avctx, AV_LOG_WARNING, "Invalid and inefficient vfw-avi packed B frames detected\n");
+            s->showed_packed_warning=1;
+        }
     }
 
     /* ffmpeg detection */
index aaffb86ef028bc7dec9932f46cb3e044d0a740f7..4ddd30c483c1e671f7865cc8aa2a653d3391832a 100644 (file)
@@ -487,6 +487,7 @@ typedef struct MpegEncContext {
     /* H.263 specific */
     int gob_index;
     int obmc;                       ///< overlapped block motion compensation
+    int showed_packed_warning;      ///< flag for having shown the warning about divxs invalid b frames
 
     /* H.263+ specific */
     int umvplus;                    ///< == H263+ && unrestricted_mv