From 887d1bf5cad736d8fadb5753fbac2bba7efdf34c Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 28 Mar 2010 16:14:36 +0200 Subject: [PATCH] Small clarification in transcode_cleanup() --- src/transcode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/transcode.c b/src/transcode.c index 1e3d5c1b..8f20690c 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -501,8 +501,11 @@ transcode_cleanup(struct transcode_ctx *ctx) close(ctx->fd); free(ctx->rawbuffer); } - if (ctx->apacket.data) - av_free_packet(&ctx->apacket); + else + { + if (ctx->apacket.data) + av_free_packet(&ctx->apacket); + } avcodec_close(ctx->acodec); av_close_input_file(ctx->fmtctx);