[vlc-devel] [RFC PATCH 3/7] h264_nal: add h264_get_spspps

Francois Cartegnie fcvlcdev at free.fr
Thu Apr 23 21:02:04 CEST 2015


Le 23/04/2015 19:30, Thomas Guillem a écrit :

> +/* Nal unit order: all units are optional but in that order (cf. 7.4.1.2.3) */
> +static int get_nal_order( int i_nal_type )
> +{
> +    static const int nal_orders[] = {
> +        NAL_UNKNOWN, NAL_AU_DELIMITER, NAL_SPS, NAL_PPS
> +    };
> +
> +    for( int i = 0; i < 4; ++i )
> +        if( i_nal_type == nal_orders[i] )
> +            return i;
> +    return -1;
> +}

There's no such order. It just says they must come first.

Parsing algorithm, assuming packetized data, is:

if(type == 0 || type > 18  || (type >=10 && type <= 12) )
   fail // middle of packetized au
else
   while(type < 1 && type >5)
   {
       if (type == 7 ||type == 8)
	 copy
   }

Francois




More information about the vlc-devel mailing list