summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2011-09-12 04:03:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-12 04:03:40 +0200
commit340e6735fee6b6d29c91bb520f2de8d9e06dcd67 (patch)
treefecbbdb29f5c9340ac2deacee0da4b4d9a65ff7a /libavcodec/mpeg12.c
parent411cc5c46a89ce0a79832c37d0eab1ed884e5423 (diff)
mpeg12dec: if lavc's mpeg2 decoder was asked to drop a frame, it could still output an old frame, and mess up timestamps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 970d1d5703..6c4882671a 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1968,7 +1968,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
ff_xvmc_field_end(s);
/* end of slice reached */
- if (/*s->mb_y << field_pic == s->mb_height &&*/ !s->first_field) {
+ if (/*s->mb_y << field_pic == s->mb_height &&*/ !s->first_field && !s->first_slice) {
/* end of image */
s->current_picture_ptr->f.qscale_type = FF_QSCALE_TYPE_MPEG2;