aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-07-23 09:58:02 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-07-23 09:58:02 +0000
commite9174ba460aee4dd6b90ad598ebbaea683f774bf (patch)
treeae4199ee59d80d9cd6b25b43d05f96aaf4cdef2a /libavcodec/mpeg12.c
parenta15e68deb6a0578941c8471c4b2b9b03f920ffab (diff)
downloadffmpeg-e9174ba460aee4dd6b90ad598ebbaea683f774bf.tar.gz
last frame decoding fix
Originally committed as revision 2074 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index e84fa55133..99678500e7 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -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;
}