Mercurial > libavcodec.hg
diff mpeg12.c @ 1372:b52e62d17bbb libavcodec
last frame decoding fix
author | michaelni |
---|---|
date | Wed, 23 Jul 2003 09:58:02 +0000 |
parents | 45d761c387cd |
children | 5d2435fb733d |
line wrap: on
line diff
--- a/mpeg12.c Wed Jul 23 00:32:50 2003 +0000 +++ b/mpeg12.c Wed Jul 23 09:58:02 2003 +0000 @@ -2231,12 +2231,11 @@ *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; }