]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tscc.c
avformat/audiointerleave: only keep the retime functionality of the audio interleaver
[ffmpeg] / libavcodec / tscc.c
index 31e7caeeebe7a00c4b41300399e1848c46035887..6d03081bb0a3bdca8de2af076ba999bd646c67c0 100644 (file)
@@ -103,7 +103,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
         return AVERROR_UNKNOWN;
     }
 
-    if ((ret = ff_reget_buffer(avctx, frame)) < 0)
+    if ((ret = ff_reget_buffer(avctx, frame, 0)) < 0)
         return ret;
 
     if (ret != Z_DATA_ERROR) {
@@ -169,6 +169,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
     }
 
     c->frame = av_frame_alloc();
+    if (!c->frame)
+        return AVERROR(ENOMEM);
 
     return 0;
 }
@@ -195,4 +197,5 @@ AVCodec ff_tscc_decoder = {
     .close          = decode_end,
     .decode         = decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };