From d6db1c9c6a331da88c3eca9b0afa939dbbf24651 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 27 Oct 2002 00:02:23 +0000 Subject: handle direct rendering buffer allocation failure Originally committed as revision 1075 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mpeg12.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec/mpeg12.c') diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 84c424915e..4bd8d1aeb9 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1581,7 +1581,8 @@ static int mpeg_decode_slice(AVCodecContext *avctx, /* start frame decoding */ if (s->first_slice) { s->first_slice = 0; - MPV_frame_start(s, avctx); + if(MPV_frame_start(s, avctx) < 0) + return -1; } init_get_bits(&s->gb, buf, buf_size); -- cgit v1.2.3