diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index 50601807a7..cb9135436a 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -738,7 +738,7 @@ FF_ENABLE_DEPRECATION_WARNINGS static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *picture, int *got_packet) { - int xerr, i, ret, user_packet = !!pkt->data; + int xerr, i, ret; struct xvid_context *x = avctx->priv_data; int mb_width = (avctx->width + 15) / 16; int mb_height = (avctx->height + 15) / 16; @@ -866,8 +866,6 @@ FF_ENABLE_DEPRECATION_WARNINGS return 0; } else { - if (!user_packet) - av_packet_unref(pkt); if (!xerr) return 0; av_log(avctx, AV_LOG_ERROR,