Browse Source

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>
tags/n0.9
Michael Niedermayer Marton Balint 14 years ago
parent
commit
d8407ee2b1
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      ffplay.c

+ 6
- 1
ffplay.c View File

@@ -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;


Loading…
Cancel
Save