diff --git a/libavcodec/encode.c b/libavcodec/encode.c index d9761515aa..0ebd8dd6a5 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -135,7 +135,6 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY) && !frame) { av_packet_unref(avpkt); - av_init_packet(avpkt); return 0; } @@ -241,7 +240,6 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, if (ret < 0 || !*got_packet_ptr) { av_packet_unref(avpkt); - av_init_packet(avpkt); goto end; } @@ -282,8 +280,6 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx, if (!(avctx->codec->capabilities & AV_CODEC_CAP_DELAY) && !frame) { av_packet_unref(avpkt); - av_init_packet(avpkt); - avpkt->size = 0; return 0; }