[vlc-devel] [PATCH] demux/ts.c: artifact rather than frame dropping

Laurent Aimar fenrir at elivagar.org
Fri Apr 13 13:59:20 CEST 2012


On Fri, Apr 13, 2012 at 01:07:08PM +0200, Frederic YHUEL wrote:
> 2012/4/13 Frédéric Yhuel <fyhuel at viotech.net>:
> > Small video artifacts are usually better than dropping full frames.
> > Seems like the same goes for audio, at least with a HLS stream.
> > ---
> >  modules/demux/ts.c |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/modules/demux/ts.c b/modules/demux/ts.c
> > index f9c2f4d..b7f01d9 100644
> > --- a/modules/demux/ts.c
> > +++ b/modules/demux/ts.c
> > @@ -2054,10 +2054,12 @@ static bool GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
> >                       i_cc, ( pid->i_cc + 1 )&0x0f, pid->i_pid );
> >
> >             pid->i_cc = i_cc;
> > -            if( pid->es->p_pes && pid->es->fmt.i_cat != VIDEO_ES )
> > +            if( pid->es->p_pes && pid->es->fmt.i_cat != VIDEO_ES &&
> > +                                  pid->es->fmt.i_cat != AUDIO_ES )
> >             {
> >                 /* Small video artifacts are usually better than
> > -                 * dropping full frames */
> > +                 * dropping full frames. The same goes for audio,
> > +                 * at least with a HLS stream */
> >                 pid->es->p_pes->i_flags |= BLOCK_FLAG_CORRUPTED;
> >             }
> >         }
> > --
> > 1.7.5.4
> >
> 
> I'm not sure about this patch, but do the test with the following stream:
> 
> http://demo.anevia.com:3128/live/disk1/live1/ss-hls-fta/live1.m3u8
> 
> In that particular case, at least, it's much more better with the patch.

 IMHO, One issue with audio is that on corrupted streams, you can have very bad
audio artifact (cracks, high frequencies, sometimes very loud) which can be quite
bad, especially when you have the volume turned up or if you are using headphone...

Regards,

-- 
fenrir



More information about the vlc-devel mailing list