Commit f298d137 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: flac: call packetizer at eos.

refs #3178
parent bb4af408
...@@ -199,14 +199,16 @@ static int Demux( demux_t *p_demux ) ...@@ -199,14 +199,16 @@ static int Demux( demux_t *p_demux )
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
block_t *p_block_in, *p_block_out; block_t *p_block_in, *p_block_out;
if( !( p_block_in = stream_Block( p_demux->s, FLAC_PACKET_SIZE ) ) ) bool b_eof = !( p_block_in = stream_Block( p_demux->s, FLAC_PACKET_SIZE ) );
return 0;
p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start ? VLC_TS_0 : VLC_TS_INVALID; if ( p_block_in )
p_sys->b_start = false; {
p_block_in->i_pts = p_block_in->i_dts = p_sys->b_start ? VLC_TS_0 : VLC_TS_INVALID;
p_sys->b_start = false;
}
while( (p_block_out = p_sys->p_packetizer->pf_packetize( while( (p_block_out = p_sys->p_packetizer->pf_packetize(
p_sys->p_packetizer, &p_block_in )) ) p_sys->p_packetizer, (p_block_in) ? &p_block_in : NULL )) )
{ {
while( p_block_out ) while( p_block_out )
{ {
...@@ -230,7 +232,7 @@ static int Demux( demux_t *p_demux ) ...@@ -230,7 +232,7 @@ static int Demux( demux_t *p_demux )
p_block_out = p_next; p_block_out = p_next;
} }
} }
return 1; return !b_eof;
} }
/***************************************************************************** /*****************************************************************************
......
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