aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2005-11-10 04:40:49 +0000
committerLoren Merritt <lorenm@u.washington.edu>2005-11-10 04:40:49 +0000
commit3165e258b14e3af13d368d00993cdc6d28a566c9 (patch)
treea35a64c2721bb51bd852c98b435cec07e0b75bd1 /libavcodec
parent4519b8a672241a8f77345ff7791257fbeef74e7d (diff)
downloadffmpeg-3165e258b14e3af13d368d00993cdc6d28a566c9.tar.gz
fix a crash on seeking to an invalid frame
Originally committed as revision 4685 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index ea6a479bed..2bc572b906 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7731,10 +7731,13 @@ static int decode_frame(AVCodecContext *avctx,
h->delayed_output_pic = out;
#endif
- *pict= *(AVFrame*)out;
+ if(out)
+ *pict= *(AVFrame*)out;
+ else
+ av_log(avctx, AV_LOG_DEBUG, "no picture\n");
}
- assert(pict->data[0]);
+ assert(pict->data[0] || !*data_size);
ff_print_debug_info(s, pict);
//printf("out %d\n", (int)pict->data[0]);
#if 0 //?