aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-09 20:51:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-09 20:51:49 +0100
commit8cd210700b831f014d527fcb39a4623b8fa926fd (patch)
tree0ba588b7e09429ab356ba5915ca6ebb87fddf3d7 /ffplay.c
parent82a1d575757d5bc9b0b218fe89c77f8de06a7d39 (diff)
parentd8407ee2b1e9f62763a2f47d55f80f7993718c99 (diff)
downloadffmpeg-8cd210700b831f014d527fcb39a4623b8fa926fd.tar.gz
Merge remote-tracking branch 'cus/stable'
* cus/stable: ffplay: limit lowres to the maximum supported. Fixes Ticket591 Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 f09697954f..c85dad5e2f 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;