summaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-11 18:37:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-11 18:46:56 +0200
commitde1824e970d448a84bedce4936c301c322baa714 (patch)
treea36ef4a1f2cc5e156751f874cd056a5fe2d0afde /libavcodec/mpeg12.c
parente20f46481bc8f51fe55e9ee1657aced939d8552f (diff)
downloadffmpeg-streaming-de1824e970d448a84bedce4936c301c322baa714.zip
ffmpeg-streaming-de1824e970d448a84bedce4936c301c322baa714.tar.gz
mpeg12: fix logic that prevents extradata from being parsed twice.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 30456e9..c7118a5 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2286,12 +2286,13 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
s->slice_count = 0;
- if (avctx->extradata && !avctx->frame_number) {
+ if (avctx->extradata && !s->parsed_extra) {
int ret = decode_chunks(avctx, picture, data_size, avctx->extradata, avctx->extradata_size);
if(*data_size) {
av_log(avctx, AV_LOG_ERROR, "picture in extradata\n");
*data_size = 0;
}
+ s->parsed_extra = 1;
if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
return ret;
}
OpenPOWER on IntegriCloud