[vlc-devel] [PATCH 1/3] decoder: process the last block when closing
Rafaël Carré
rafael.carre at gmail.com
Wed Aug 3 05:06:47 CEST 2011
Le Tue, 2 Aug 2011 21:32:25 +0200,
Laurent Aimar <fenrir at elivagar.org> a écrit :
> > +void EsOutEOS(es_out_t *out)
> > +{
> > + es_out_sys_t *p_sys = out->p_sys;
> > + for (int i = 0; i < p_sys->i_es; i++) {
> > + es_out_id_t *id = p_sys->es[i];
> > + decoder_t *p_dec = id->p_dec;
> p_dec can be NULL and you have locking issue (but it should probably
> be automatically fixed when you implement it as advised below.
Ok (not sure how locking issue can be fixed though :?)
> > index 7927480..efab1b4 100644
> > --- a/src/input/input.c
> > +++ b/src/input/input.c
> > @@ -617,6 +617,7 @@ static void MainLoopDemux( input_thread_t
> > *p_input, bool *pb_changed, bool *pb_d {
> > msg_Dbg( p_input, "EOF reached" );
> > p_input->p->input.b_eof = true;
> > + EsOutEOS(p_input->p->p_es_out_display);
> Now, you will have to send this order through p_input->p->p_es_out
> which mean you need to let it pass through es_out_timeshift.
> For that you can look at how ES_OUT_SET_TIMES/es_out_SetTimes are
> implemented.
Using es_out_display directly seems appropriate because we need to
notify the decoder and es_out_timeshift is not associated to decoders.
What did I miss?
Attached patch changes the following:
renames BLOCK_FLAG_EOS to BLOCK_FLAG_CORE_EOS
lock es_out_t->p_sys->lock
don't notify unexisting decoders
rename EsOutEOS -> es_out_eos
--
Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-decoder-process-the-last-block-when-closing.patch
Type: text/x-patch
Size: 3527 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110802/b498d025/attachment.bin>
More information about the vlc-devel
mailing list