diff mbox series

[FFmpeg-devel,16/16] avcodec/wmaenc: Don't unnecessarily reset AVPacket.size

Message ID AS8P250MB074442EA851A0C329D7B44598FF62@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/12] avutil/avassert: Add av_unreachable and av_assume() macros | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt May 25, 2024, 12:48 a.m. UTC
The packet is unreferenced generically lateron anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavcodec/wmaenc.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series


diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index b4650d42b3..73ce0876c9 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -418,7 +418,6 @@  static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
         error = encode_frame(s, s->coefs, avpkt->data, avpkt->size, total_gain++);
     if (error > 0) {
         av_log(avctx, AV_LOG_ERROR, "Invalid input data or requested bitrate too low, cannot encode\n");
-        avpkt->size = 0;
         return AVERROR(EINVAL);
     remaining = -error;