[FFmpeg-devel] [PATCH 1/2] avformat/utils: Export coded dimensions unconditionally

Michael Niedermayer michael at niedermayer.cc
Sun Jun 5 05:13:27 CEST 2016


This fixes a API regression
Probably fixes Ticket5451

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/utils.c   |    4 ++--
 libavformat/version.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index ac056c4..7ca0a12 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3789,8 +3789,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
             av_codec_set_lowres(st->codec, av_codec_get_lowres(st->internal->avctx));
             st->codec->width = st->internal->avctx->width;
             st->codec->height = st->internal->avctx->height;
-            st->codec->coded_width = st->internal->avctx->coded_width;
-            st->codec->coded_height = st->internal->avctx->coded_height;
         }
 
         if (st->codec->codec_tag != MKTAG('t','m','c','d'))
@@ -3807,6 +3805,8 @@ FF_DISABLE_DEPRECATION_WARNINGS
         }
 
         // Fields unavailable in AVCodecParameters
+        st->codec->coded_width = st->internal->avctx->coded_width;
+        st->codec->coded_height = st->internal->avctx->coded_height;
         st->codec->properties = st->internal->avctx->properties;
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
diff --git a/libavformat/version.h b/libavformat/version.h
index c92a23f..2f79b7f 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -29,7 +29,7 @@
 
 #include "libavutil/version.h"
 
-// When bumping major check Ticket5467, 5421 for regressing
+// When bumping major check Ticket5467, 5421, 5451 for regressing
 // Also please add any ticket numbers that you belive might regress here
 #define LIBAVFORMAT_VERSION_MAJOR  57
 #define LIBAVFORMAT_VERSION_MINOR  37
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list