[FFmpeg-cvslog] avcodec/mpeg12dec: Don' t create side data when current picture ptr is NULL.
Tomer Barletz
git at videolan.org
Mon Dec 16 03:28:40 CET 2013
ffmpeg | branch: master | Tomer Barletz <barletz at gmail.com> | Sun Dec 15 00:18:05 2013 -0800| [fe285b04bbad23ddfac164e22034b5ee76e039a6] | committer: Michael Niedermayer
avcodec/mpeg12dec: Don't create side data when current picture ptr is NULL.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe285b04bbad23ddfac164e22034b5ee76e039a6
---
libavcodec/mpeg12dec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index e50f518..653e78c 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;
More information about the ffmpeg-cvslog
mailing list