[vlc-devel] commit: Send an end of sequence after a still frame. (Laurent Aimar )
git version control
git at videolan.org
Thu Aug 21 19:09:04 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Aug 21 19:06:54 2008 +0200| [178c33b31c52e22bf49e7ce49dc28f44e4949ea8] | committer: Laurent Aimar
Send an end of sequence after a still frame.
It is some sort of workaround for some DVD menu.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=178c33b31c52e22bf49e7ce49dc28f44e4949ea8
---
modules/access/dvdnav.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 5737186..8554ac1 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -155,7 +155,7 @@ struct demux_sys_t
static int Control( demux_t *, int, va_list );
static int Demux( demux_t * );
-static int DemuxBlock( demux_t *, uint8_t *, int );
+static int DemuxBlock( demux_t *, const uint8_t *, int );
static void DemuxTitles( demux_t * );
static void ESSubtitleUpdate( demux_t * );
@@ -603,6 +603,15 @@ static int Demux( demux_t *p_demux )
case DVDNAV_STILL_FRAME:
{
+ /* We send a dummy mpeg2 end of sequence to force still frame display */
+ static const uint8_t buffer[] = {
+ 0x00, 0x00, 0x01, 0xe0, 0x00, 0x07,
+ 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0xB7,
+ };
+ DemuxBlock( p_demux, buffer, sizeof(buffer) );
+
+ /* */
dvdnav_still_event_t *event = (dvdnav_still_event_t*)packet;
vlc_mutex_lock( &p_sys->p_ev->lock );
if( !p_sys->p_ev->b_still )
@@ -1028,10 +1037,10 @@ static void ESSubtitleUpdate( demux_t *p_demux )
/*****************************************************************************
* DemuxBlock: demux a given block
*****************************************************************************/
-static int DemuxBlock( demux_t *p_demux, uint8_t *pkt, int i_pkt )
+static int DemuxBlock( demux_t *p_demux, const uint8_t *pkt, int i_pkt )
{
demux_sys_t *p_sys = p_demux->p_sys;
- uint8_t *p = pkt;
+ const uint8_t *p = pkt;
while( p < &pkt[i_pkt] )
{
More information about the vlc-devel
mailing list