]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qdrw.c
Add stereo rematrixing support to the AC-3 encoders.
[ffmpeg] / libavcodec / qdrw.c
index 0f9609159ccfc64f41dfeefd64861b90431d31e8..57500580e2dce16b012051bfc2cbe76612e0c9c4 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libavcodec/qdrw.c
+ * @file
  * Apple QuickDraw codec.
  */
 
@@ -135,23 +135,29 @@ static int decode_frame(AVCodecContext *avctx,
 static av_cold int decode_init(AVCodecContext *avctx){
 //    QdrawContext * const a = avctx->priv_data;
 
-    if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
-        return 1;
-    }
-
     avctx->pix_fmt= PIX_FMT_PAL8;
 
     return 0;
 }
 
+static av_cold int decode_end(AVCodecContext *avctx){
+    QdrawContext * const a = avctx->priv_data;
+    AVFrame *pic = &a->pic;
+
+    if (pic->data[0])
+        avctx->release_buffer(avctx, pic);
+
+    return 0;
+}
+
 AVCodec qdraw_decoder = {
     "qdraw",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_QDRAW,
     sizeof(QdrawContext),
     decode_init,
     NULL,
-    NULL,
+    decode_end,
     decode_frame,
     CODEC_CAP_DR1,
     .long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"),