1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ffplay: avoid direct access to max_lowres use av_codec_get_max_lowres()

This avoids future ABI issues when the field is moved to the end of the
struct.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-03 16:59:11 +02:00
parent 5f99e6d632
commit b72040daad

View File

@ -2496,10 +2496,10 @@ static int stream_component_open(VideoState *is, int stream_index)
avctx->codec_id = codec->id; avctx->codec_id = codec->id;
avctx->workaround_bugs = workaround_bugs; avctx->workaround_bugs = workaround_bugs;
avctx->lowres = lowres; avctx->lowres = lowres;
if(avctx->lowres > codec->max_lowres){ if(avctx->lowres > av_codec_get_max_lowres(codec)){
av_log(avctx, AV_LOG_WARNING, "The maximum value for lowres supported by the decoder is %d\n", av_log(avctx, AV_LOG_WARNING, "The maximum value for lowres supported by the decoder is %d\n",
codec->max_lowres); av_codec_get_max_lowres(codec));
avctx->lowres= codec->max_lowres; avctx->lowres= av_codec_get_max_lowres(codec);
} }
avctx->error_concealment = error_concealment; avctx->error_concealment = error_concealment;