[FFmpeg-cvslog] ffplay: avoid direct access to max_lowres use av_codec_get_max_lowres()

Michael Niedermayer git at videolan.org
Thu Oct 3 22:43:58 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct  3 16:59:11 2013 +0200| [b72040daad03686318c227f3d40c4cd12e9d9eb4] | committer: Michael Niedermayer

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 at passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffplay.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 4d89c02..e3f5062 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2496,10 +2496,10 @@ static int stream_component_open(VideoState *is, int stream_index)
     avctx->codec_id = codec->id;
     avctx->workaround_bugs   = workaround_bugs;
     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",
-                codec->max_lowres);
-        avctx->lowres= codec->max_lowres;
+                av_codec_get_max_lowres(codec));
+        avctx->lowres= av_codec_get_max_lowres(codec);
     }
     avctx->error_concealment = error_concealment;
 



More information about the ffmpeg-cvslog mailing list