[FFmpeg-cvslog] ffplay: limit lowres to the maximum supported. Fixes Ticket591

Michael Niedermayer git at videolan.org
Fri Nov 18 21:09:03 CET 2011


ffmpeg | branch: release/0.8 | Michael Niedermayer <michaelni at gmx.at> | Tue Nov  8 03:14:13 2011 +0100| [abaf8c386e6bc5080f5349b66ba31b42110ad84f] | committer: Michael Niedermayer

ffplay: limit lowres to the maximum supported. Fixes Ticket591

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Marton Balint <cus at passwd.hu>
(cherry picked from commit d8407ee2b1e9f62763a2f47d55f80f7993718c99)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=abaf8c386e6bc5080f5349b66ba31b42110ad84f
---

 ffplay.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 6ac8f34..cf7962a 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2135,7 +2135,12 @@ static int stream_component_open(VideoState *is, int stream_index)
 
     avctx->workaround_bugs = workaround_bugs;
     avctx->lowres = lowres;
-    if(lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
+    if(avctx->lowres > codec->max_lowres){
+        av_log(avctx, AV_LOG_WARNING, "The maximum value for lowres supported by the decoder is %d\n",
+                codec->max_lowres);
+        avctx->lowres= codec->max_lowres;
+    }
+    if(avctx->lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
     avctx->idct_algo= idct;
     if(fast) avctx->flags2 |= CODEC_FLAG2_FAST;
     avctx->skip_frame= skip_frame;



More information about the ffmpeg-cvslog mailing list