On Tue, Dec 10, 2013 at 03:42:28PM +0100, Guillaume Martres wrote:
> --- a/libavcodec/hevc_ps.c
> +++ b/libavcodec/hevc_ps.c
> @@ -328,12 +328,13 @@ int ff_hevc_decode_nal_vps(HEVCContext *s)
>      GetBitContext *gb = &s->HEVClc.gb;
>      int vps_id = 0;
>      HEVCVPS *vps;
> +    AVBufferRef *vps_buf = av_buffer_allocz(sizeof(*vps));

Shouldn't this be sizeof(*vps_buf)?

> -    av_log(s->avctx, AV_LOG_DEBUG, "Decoding VPS\n");
> +    if (!vps_buf)
> +      return AVERROR(ENOMEM);
> +    vps = (HEVCVPS*)vps_buf->data;
>  
> -    vps = av_mallocz(sizeof(*vps));
> -    if (!vps)
> -        return AVERROR(ENOMEM);
> +    av_log(s->avctx, AV_LOG_DEBUG, "Decoding VPS\n");

Seems like it was copy-pasted from here.

Moving the av_log to after VPS was decoded kind of changes the
semantics of the message.  Whatever you prefer.

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

Reply via email to