[FFmpeg-devel] [PATCH 06/13] openal-dec: replace av_destruct_packet with av_free_packet

wm4 nfxjfg at googlemail.com
Sat Aug 22 18:58:32 CEST 2015


On Sat, 8 Aug 2015 13:32:22 +0200
Andreas Cadhalpun <andreas.cadhalpun at googlemail.com> wrote:

> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  libavdevice/openal-dec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavdevice/openal-dec.c b/libavdevice/openal-dec.c
> index b552158..cab1eb6 100644
> --- a/libavdevice/openal-dec.c
> +++ b/libavdevice/openal-dec.c
> @@ -204,7 +204,7 @@ static int read_packet(AVFormatContext* ctx, AVPacket *pkt)
>  fail:
>      /* Handle failure */
>      if (pkt->data)
> -        av_destruct_packet(pkt);
> +        av_free_packet(pkt);
>      if (error_msg)
>          av_log(ctx, AV_LOG_ERROR, "Error: %s\n", error_msg);
>      return error;

LGTM

(Actually the old code looks buggy... can't use av_destruct_packet() on
a packet allocated with av_new_packet().)


More information about the ffmpeg-devel mailing list