[FFmpeg-devel] [PATCH] avcodec/h264_parser: create nalus without trailing bits

Aman Gupta aman at tmm1.net
Sat May 19 03:19:48 EEST 2018


On Fri, May 18, 2018 at 4:50 PM, Aman Gupta <ffmpeg at tmm1.net> wrote:

> From: Aman Gupta <aman at tmm1.net>
>
> Fixes "unknown SEI type 128" debug messages from the parser
> on https://tmm1.s3.amazonaws.com/vts.mpg


This fixed SEI parsing, but now I'm seeing other parser errors on the same
input:

Overread SPS by 8 bits
illegal reordering_of_pic_nums_idc 5

So this is still not quite right.

Aman


>
>
> Signed-off-by: Aman Gupta <aman at tmm1.net>
> ---
>  libavcodec/h264_parser.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
> index 1a9840a62c..a546239370 100644
> --- a/libavcodec/h264_parser.c
> +++ b/libavcodec/h264_parser.c
> @@ -311,7 +311,7 @@ static inline int parse_nal_units(AVCodecParserContext
> *s,
>
>          buf_index += consumed;
>
> -        ret = init_get_bits8(&nal.gb, nal.data, nal.size);
> +        ret = init_get_bits(&nal.gb, nal.data, nal.size_bits);
>          if (ret < 0)
>              goto fail;
>          get_bits1(&nal.gb);
> --
> 2.14.2
>
>


More information about the ffmpeg-devel mailing list