From f4fa2f51b82895a35480a39041e393e95d0ac0d8 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sat, 16 Nov 2002 12:22:15 +0000 Subject: send the NAV packet AFTER a discontinuity, not BEFORE (I have a DVD - Back to the Future RC2 - where there are stillframes, that are only detectable by the fact, that the audio track is still playing. No DVD still flags are set at all. So the player should play the audio up to the end and then release the still and go on with decoding. This in fact does already work, since because of the discontinuity after the still, metronom will block video decoder thread until audio is finished, except for the NAV packet, which is send BEFORE the discontinuity and therefore comes far too early. Result is, that the menu buttons are already laid out and reacting according to the next menu, although the image of the one before is still shown.) CVS patchset: 3272 CVS date: 2002/11/16 12:22:15 --- src/demuxers/demux_mpeg_block.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index ea56e3afa..ac79d4f67 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg_block.c,v 1.139 2002/11/15 17:59:47 esnel Exp $ + * $Id: demux_mpeg_block.c,v 1.140 2002/11/16 12:22:15 mroi Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -321,17 +321,6 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m end_pts |= (p[7+18] << 8); end_pts |= p[7+19]; - buf->content = p; - buf->size = packet_len; - buf->type = BUF_SPU_DVD; - buf->decoder_flags |= BUF_FLAG_SPECIAL; - buf->decoder_info[1] = BUF_SPECIAL_SPU_DVD_SUBTYPE; - buf->decoder_info[2] = SPU_DVD_SUBTYPE_NAV; - buf->pts = 0; /* NAV packets do not have PES values */ - buf->input_pos = this->input->get_current_pos(this->input); - buf->input_length = this->input->get_length (this->input); - this->video_fifo->put (this->video_fifo, buf); - #ifdef LOG printf ("demux_mpeg_block: NAV packet, start pts = %lld, end_pts = %lld\n", start_pts, end_pts); @@ -354,6 +343,17 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m this->send_newpts = 0; this->last_pts[PTS_AUDIO] = this->last_pts[PTS_VIDEO] = 0; + buf->content = p; + buf->size = packet_len; + buf->type = BUF_SPU_DVD; + buf->decoder_flags |= BUF_FLAG_SPECIAL; + buf->decoder_info[1] = BUF_SPECIAL_SPU_DVD_SUBTYPE; + buf->decoder_info[2] = SPU_DVD_SUBTYPE_NAV; + buf->pts = 0; /* NAV packets do not have PES values */ + buf->input_pos = this->input->get_current_pos(this->input); + buf->input_length = this->input->get_length (this->input); + this->video_fifo->put (this->video_fifo, buf); + return ; } -- cgit v1.2.3