diff options
Diffstat (limited to 'libavformat/img2enc.c')
-rw-r--r-- | libavformat/img2enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index efc9304..7f0ff19 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -157,11 +157,11 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) (ret = avformat_write_header(fmt, NULL)) < 0 || (ret = av_interleaved_write_frame(fmt, &pkt2)) < 0 || (ret = av_write_trailer(fmt)) < 0) { - av_free_packet(&pkt2); + av_packet_unref(&pkt2); avformat_free_context(fmt); return ret; } - av_free_packet(&pkt2); + av_packet_unref(&pkt2); avformat_free_context(fmt); } else { avio_write(pb[0], pkt->data, pkt->size); |