[FFmpeg-devel] [PATCH]Always test lowres

Carl Eugen Hoyos cehoyos
Mon Sep 13 23:36:06 CEST 2010


Hi!

Reimar suggested this patch, iiuc.

Please comment, Carl Eugen
-------------- next part --------------
Index: libavcodec/utils.c
===================================================================
--- libavcodec/utils.c	(revision 25112)
+++ libavcodec/utils.c	(working copy)
@@ -504,13 +504,13 @@
         goto free_and_end;
     }
     avctx->frame_number = 0;
+    if (avctx->codec->max_lowres < avctx->lowres) {
+        av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",
+               avctx->codec->max_lowres);
+        goto free_and_end;
+    }
+
     if(avctx->codec->init){
-        if (avctx->codec->max_lowres < avctx->lowres) {
-            av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n",
-                   avctx->codec->max_lowres);
-            goto free_and_end;
-        }
-
         ret = avctx->codec->init(avctx);
         if (ret < 0) {
             goto free_and_end;



More information about the ffmpeg-devel mailing list