summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-01-06 03:06:25 +0200
committerMartin Storsjö <martin@martin.st>2012-01-07 15:25:35 +0200
commitc5d907b6b03ef431b9901fc9090887b03fd7a09a (patch)
tree0271aaa36f3a7deb38b6cfa75cd9f496988f67b5 /libavcodec/utils.c
parent867f923df48f6dec76eeff9ba0444a0cb9ff0441 (diff)
downloadffmpeg-streaming-c5d907b6b03ef431b9901fc9090887b03fd7a09a.zip
ffmpeg-streaming-c5d907b6b03ef431b9901fc9090887b03fd7a09a.tar.gz
libavcodec: Handle param change side data in avcodec_decode_video2, too
Also call avcodec_set_dimensions on dimension param change packets. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a1d2a01..2bc1dcf 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -879,6 +879,7 @@ static void apply_param_change(AVCodecContext *avctx, AVPacket *avpkt)
return;
avctx->width = bytestream_get_le32(&data);
avctx->height = bytestream_get_le32(&data);
+ avcodec_set_dimensions(avctx, avctx->width, avctx->height);
size -= 8;
}
}
@@ -894,6 +895,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
return -1;
avctx->pkt = avpkt;
+ apply_param_change(avctx, avpkt);
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
if (HAVE_THREADS && avctx->active_thread_type&FF_THREAD_FRAME)
OpenPOWER on IntegriCloud