[vlc-devel] Regression in VLC version 3.0.1 - raw ".h264" video files do not play properly

Ross Finlayson finlayson at live555.com
Tue Mar 20 07:09:11 CET 2018


> On Mar 20, 2018, at 4:23 PM, Zhao Zhili <quinkblack at foxmail.com> wrote:
> 
> does_not_play_in_vlc_3_0_1.h264 has a SPS followed by a PPS and an access unit
> delimiter. The specification says:
> 
> When an access unit delimiter NAL unit is present, it shall be the first NAL
> unit. There shall be at most one access unit delimiter NAL unit in any access
> unit.
> 
> h26x demuxer checks that. Without the check, it plays well.
> I have no idea if it's OK to not check since I know little about H.264.

Thanks Zhili.  This file was created using simple video repair software (for corrupted DJI drone video files) that takes the raw video data (H.264 NAL units) from the file, and simply prepends it with a SPS and a PPS NAL unit.  That’s why the order of NAL units doesn’t quite follow the spec. But unless there are strong reasons to enforce the proper ordering, then I suggest removing the check, as you noted:

> diff --git a/modules/demux/mpeg/h26x.c b/modules/demux/mpeg/h26x.c
> index 3072551..d046cdb 100644
> --- a/modules/demux/mpeg/h26x.c
> +++ b/modules/demux/mpeg/h26x.c
> @@ -205,7 +205,7 @@ static int ProbeH264( const uint8_t *p_peek, size_t i_peek, void *p_priv )
>      }
>      else if( i_nal_type == H264_NAL_AU_DELIMITER )
>      {
> -        if( i_ref_idc || p_ctx->b_pps || p_ctx->b_sps )
> +        if( i_ref_idc ) // || p_ctx->b_pps || p_ctx->b_sps )
>              return -1;
>      }
>      else if ( i_nal_type == H264_NAL_SEI )


Now, do you have any idea why the file
	http://www.live555.com/tmp/jerky_in-vlc_3_0_1.h264
plays jerkily in VLC 3.0.1, but plays OK in VLC 2.2.8?  The problem there is (presumably) something more complex…


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/



More information about the vlc-devel mailing list