Hi,

On Mon, Jun 13, 2011 at 5:24 AM, Anton Khirnov <[email protected]> wrote:
> From: Philip Langdale <[email protected]>
>
> Currently, the parser is buggy and only processes the stream extradata
> when the flag is set. This fixes it to actually inspect the frames.
>
> Whitespce will be fixed in a separate change.
>
> Signed-off-by: Philip Langdale <[email protected]>
> Signed-off-by: Anton Khirnov <[email protected]>
> ---
>  libavcodec/h264_parser.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
> index 621ff02..a314953 100644
> --- a/libavcodec/h264_parser.c
> +++ b/libavcodec/h264_parser.c
> @@ -270,6 +270,7 @@ static int h264_parse(AVCodecParserContext *s,
>             assert(pc->last_index + next >= 0 );
>             ff_h264_find_frame_end(h, &pc->buffer[pc->last_index + next], 
> -next); //update state
>         }
> +    }
>
>         parse_nal_units(s, avctx, buf, buf_size);
>
> @@ -285,7 +286,6 @@ static int h264_parse(AVCodecParserContext *s,
>         if (s->flags & PARSER_FLAG_ONCE) {
>             s->flags &= PARSER_FLAG_COMPLETE_FRAMES;
>         }
> -    }
>
>     *poutbuf = buf;
>     *poutbuf_size = buf_size;

The flag is undocumented, so this is semi-unreviewable. I think the
patch is fine because without it, the parser does nothing indeed.

Still, flags in public API that change behaviour should be documented,
but that's for later...

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to