From 2a6944aa21b4184d8174b74d9c0fbff807c16c4e Mon Sep 17 00:00:00 2001 From: Rich J Wareham Date: Fri, 14 Sep 2001 21:25:55 +0000 Subject: Added some stuff to make still-frame menus work a bit better, allowed events for UI to find language of audio/spu track CVS patchset: 636 CVS date: 2001/09/14 21:25:55 --- src/libmpeg2/decode.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libmpeg2/decode.c') diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index 632440a5f..4dd7e60a2 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -371,6 +371,20 @@ void mpeg2_close (mpeg2dec_t * mpeg2dec) } */ + /* Ensure that the last decoded frame is drawn */ + picture->current_frame->bFrameBad |= mpeg2dec->drop_frame; + + if (picture->picture_coding_type == B_TYPE) { + if (picture->mpeg1) + picture->current_frame->PTS = 0; + mpeg2dec->frames_to_drop = picture->current_frame->draw (picture->current_frame); + picture->current_frame->free (picture->current_frame); + picture->current_frame = NULL; + picture->throwaway_frame = NULL; + } else { + mpeg2dec->frames_to_drop = picture->current_frame->draw (picture->current_frame); + } + if (picture->throwaway_frame) { picture->throwaway_frame->displayed (picture->throwaway_frame); -- cgit v1.2.3