]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libopusenc.c
lavc/pngdec: set FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM capability
[ffmpeg] / libavcodec / libopusenc.c
index 8ac02f95205bdfa37bfa719e73c0cf8ed5f68f72..3f3e80d4a01d9dad7a4d0cdf4f29ab8a8457fc95 100644 (file)
@@ -361,7 +361,7 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
     discard_padding = opus->opts.packet_size - avpkt->duration;
     // Check if subtraction resulted in an overflow
     if ((discard_padding < opus->opts.packet_size) != (avpkt->duration > 0)) {
-        av_free_packet(avpkt);
+        av_packet_unref(avpkt);
         av_free(avpkt);
         return AVERROR(EINVAL);
     }
@@ -370,7 +370,7 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt,
                                                      AV_PKT_DATA_SKIP_SAMPLES,
                                                      10);
         if(!side_data) {
-            av_free_packet(avpkt);
+            av_packet_unref(avpkt);
             av_free(avpkt);
             return AVERROR(ENOMEM);
         }