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

Frederic YHUEL fyhuel at viotech.net
Fri Apr 13 13:07:08 CEST 2012


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.

-- 
Frédéric



More information about the vlc-devel mailing list