[vlc-devel] [vlc-commits] packetizer: add isavcC helper
Rémi Denis-Courmont
remi at remlab.net
Wed Dec 9 12:42:52 CET 2015
Le 2015-12-09 13:40, git at videolan.org a écrit :
> diff --git a/modules/packetizer/h264_nal.c
> b/modules/packetizer/h264_nal.c
> index 70e8761..601f3f4 100644
> --- a/modules/packetizer/h264_nal.c
> +++ b/modules/packetizer/h264_nal.c
> @@ -31,6 +31,15 @@
>
> static const uint8_t annexb_startcode[] = { 0x00, 0x00, 0x01 };
>
> +bool h264_isavcC( const uint8_t *p_buf, size_t i_buf )
> +{
> + return ( i_buf > H264_MIN_AVCC_SIZE &&
off by one?
> + p_buf[0] == 0x01 &&
> + (p_buf[4] & 0xFC) == 0xFC &&
> + (p_buf[4] & 0x03) != 0x02 &&
> + (p_buf[5] & 0xE0) == 0xE0 );
> +}
> +
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list