Commit 98fbb4df authored by michaelni's avatar michaelni

last frame decoding fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2074 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 76219525
......@@ -401,9 +401,17 @@ uint64_t time= rdtsc();
s->flags= avctx->flags;
*data_size = 0;
/* no supplementary picture */
/* no supplementary picture */
if (buf_size == 0) {
/* special case for last picture */
if (s->low_delay==0 && s->next_picture_ptr) {
*pict= *(AVFrame*)s->next_picture_ptr;
s->next_picture_ptr= NULL;
*data_size = sizeof(AVFrame);
}
return 0;
}
......
......@@ -2231,12 +2231,11 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
*data_size = 0;
/* special case for last picture */
if (buf_size == 0) {
if (s2->picture_number > 0) {
*picture= *(AVFrame*)&s2->next_picture;
if (buf_size == 0 && 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