summaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-08 03:14:13 +0100
committerMarton Balint <cus@passwd.hu>2011-11-08 22:34:39 +0100
commitd8407ee2b1e9f62763a2f47d55f80f7993718c99 (patch)
tree95f9f2326a234b4154bb2e276e6afa3ffc0ed0cb /ffplay.c
parent4e38d4ef0ea63f3c1017466e2c3e51f29ce81689 (diff)
downloadffmpeg-streaming-d8407ee2b1e9f62763a2f47d55f80f7993718c99.zip
ffmpeg-streaming-d8407ee2b1e9f62763a2f47d55f80f7993718c99.tar.gz
ffplay: limit lowres to the maximum supported. Fixes Ticket591
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 1d14c08..7e7b26c 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2226,7 +2226,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;
OpenPOWER on IntegriCloud