Commit c99dce35 authored by michael's avatar michael

Avoid segfault on ffmpeg "buffer flush" in mpeg12.c patch by (Wolfram Gloger...

Avoid segfault on ffmpeg "buffer flush" in mpeg12.c patch by (Wolfram Gloger <wmglo at dent dot med dot uni-muenchen dot de>)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3324 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7e486f46
......@@ -2769,12 +2769,14 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
MpegEncContext *s2 = &s->mpeg_enc_ctx;
dprintf("fill_buffer\n");
/* special case for last picture */
if (buf_size == 0 && s2->low_delay==0 && s2->next_picture_ptr) {
*picture= *(AVFrame*)s2->next_picture_ptr;
s2->next_picture_ptr= NULL;
if (buf_size == 0) {
/* special case for last picture */
if (s2->low_delay==0 && s2->next_picture_ptr) {
*picture= *(AVFrame*)s2->next_picture_ptr;
s2->next_picture_ptr= NULL;
*data_size = sizeof(AVFrame);
*data_size = sizeof(AVFrame);
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment