diff options
author | Tomer Barletz <barletz@gmail.com> | 2013-12-15 12:18:05 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-16 06:25:44 +0400 |
commit | fe285b04bbad23ddfac164e22034b5ee76e039a6 (patch) | |
tree | 9bcf6b92967e0372559d436085227a5ddc685e0f /libavcodec/mpeg12dec.c | |
parent | 7a994d777a0a538d0998fbb4125bf14c39017c43 (diff) |
avcodec/mpeg12dec: Don't create side data when current picture ptr is NULL.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r-- | libavcodec/mpeg12dec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index e50f518436..653e78c301 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2226,7 +2226,11 @@ static void mpeg_decode_user_data(AVCodecContext *avctx, S3D_video_format_type == 0x23) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; - AVStereo3D *stereo = av_stereo3d_create_side_data(&s->current_picture_ptr->f); + AVStereo3D *stereo; + if (!s->current_picture_ptr) + return; + + stereo = av_stereo3d_create_side_data(&s->current_picture_ptr->f); if (!stereo) return; |