Commit 36bca799 authored by Laurent Aimar's avatar Laurent Aimar

Improved a bit still frame support.

parent 4a160042
...@@ -612,6 +612,7 @@ static int Demux( demux_t *p_demux ) ...@@ -612,6 +612,7 @@ static int Demux( demux_t *p_demux )
switch( i_event ) switch( i_event )
{ {
case DVDNAV_BLOCK_OK: /* mpeg block */ case DVDNAV_BLOCK_OK: /* mpeg block */
p_sys->p_ev->b_still = false;
DemuxBlock( p_demux, packet, i_len ); DemuxBlock( p_demux, packet, i_len );
break; break;
...@@ -620,6 +621,10 @@ static int Demux( demux_t *p_demux ) ...@@ -620,6 +621,10 @@ static int Demux( demux_t *p_demux )
break; break;
case DVDNAV_STILL_FRAME: case DVDNAV_STILL_FRAME:
{
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 )
{ {
/* We send a dummy mpeg2 end of sequence to force still frame display */ /* We send a dummy mpeg2 end of sequence to force still frame display */
static const uint8_t buffer[] = { static const uint8_t buffer[] = {
...@@ -629,11 +634,6 @@ static int Demux( demux_t *p_demux ) ...@@ -629,11 +634,6 @@ static int Demux( demux_t *p_demux )
}; };
DemuxBlock( p_demux, buffer, sizeof(buffer) ); 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 )
{
msg_Dbg( p_demux, "DVDNAV_STILL_FRAME" ); msg_Dbg( p_demux, "DVDNAV_STILL_FRAME" );
msg_Dbg( p_demux, " - length=0x%x", event->length ); msg_Dbg( p_demux, " - length=0x%x", event->length );
p_sys->p_ev->b_still = true; p_sys->p_ev->b_still = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment