summaryrefslogtreecommitdiff
path: root/libavcodec/mmaldec.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-08-11 11:30:25 +0200
committerwm4 <nfxjfg@googlemail.com>2015-08-11 12:14:15 +0200
commit7f116973d59bbadce891320e338f5786ce31c65a (patch)
treeb1fcf78e9390e3f8d77f0289c440fac849723f76 /libavcodec/mmaldec.c
parent750f72d7758740d79c2b326a273cbe3af4541f18 (diff)
mmaldec: do not mutate user's AVCodecContext extradata field
Diffstat (limited to 'libavcodec/mmaldec.c')
-rw-r--r--libavcodec/mmaldec.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index c775f50d60..e2c2e57e25 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -361,10 +361,8 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
ret = AVERROR(ENOSYS);
goto fail;
}
- av_bitstream_filter_filter(ctx->bsfc, avctx, NULL, &dummy_p, &dummy_int, NULL, 0, 0);
- }
-
- if (avctx->extradata_size) {
+ av_bitstream_filter_filter(ctx->bsfc, avctx, "private_spspps_buf", &dummy_p, &dummy_int, NULL, 0, 0);
+ } else if (avctx->extradata_size) {
if ((status = mmal_format_extradata_alloc(format_in, avctx->extradata_size)))
goto fail;
format_in->extradata_size = avctx->extradata_size;
@@ -453,7 +451,7 @@ static int ffmmal_add_packet(AVCodecContext *avctx, AVPacket *avpkt)
if (ctx->bsfc) {
uint8_t *tmp_data;
int tmp_size;
- if ((ret = av_bitstream_filter_filter(ctx->bsfc, avctx, NULL,
+ if ((ret = av_bitstream_filter_filter(ctx->bsfc, avctx, "private_spspps_buf",
&tmp_data, &tmp_size,
avpkt->data, avpkt->size,
avpkt->flags & AV_PKT_FLAG_KEY)) < 0)