[FFmpeg-cvslog] Merge commit '40dd5166d2ba4f9035b93748840e408cd8be40e5'

James Almer git at videolan.org
Wed Sep 28 19:20:18 EEST 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Sep 28 13:19:07 2016 -0300| [0153cc49b20ac6c54d5bcd86f5ce53357e6b29aa] | committer: James Almer

Merge commit '40dd5166d2ba4f9035b93748840e408cd8be40e5'

* commit '40dd5166d2ba4f9035b93748840e408cd8be40e5':
  truemotion2rt: Use ff_set_dimensions

Merged-by: James Almer <jamrial at gmail.com>

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

 libavcodec/truemotion2rt.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/libavcodec/truemotion2rt.c b/libavcodec/truemotion2rt.c
index 94d4480..d639187 100644
--- a/libavcodec/truemotion2rt.c
+++ b/libavcodec/truemotion2rt.c
@@ -63,7 +63,8 @@ static int truemotion2rt_decode_header(AVCodecContext *avctx, const AVPacket *av
     uint8_t header_buffer[128] = { 0 };  /* logical maximum header size */
     const uint8_t *buf = avpkt->data;
     int size = avpkt->size;
-    int i;
+    int width, height;
+    int ret, i;
 
     if (size < 1) {
         av_log(avctx, AV_LOG_ERROR, "input packet too small (%d)\n", size);
@@ -90,8 +91,12 @@ static int truemotion2rt_decode_header(AVCodecContext *avctx, const AVPacket *av
     if (s->delta_size < 2 || s->delta_size > 4)
         return AVERROR_INVALIDDATA;
 
-    avctx->height = AV_RL16(header_buffer + 5);
-    avctx->width  = AV_RL16(header_buffer + 7);
+    height = AV_RL16(header_buffer + 5);
+    width  = AV_RL16(header_buffer + 7);
+
+    ret = ff_set_dimensions(avctx, width, height);
+    if (ret < 0)
+        return ret;
 
     av_log(avctx, AV_LOG_DEBUG, "Header size: %d\n", header_size);
     return header_size;


======================================================================




More information about the ffmpeg-cvslog mailing list