mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
last frame decoding fix
Originally committed as revision 2074 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a15e68deb6
commit
e9174ba460
@ -404,6 +404,14 @@ uint64_t time= rdtsc();
|
||||
|
||||
/* 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);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user