changeset 10180:a514a601bf26 libavcodec

Add CODEC_CAP_SUBFRAMES for codecs that output multiple subframes per AVPacket No longer print "Multiple frames in a packet" error message when CODEC_CAP_SUBFRAMES is set (wmapro, wavpack)
author faust3
date Wed, 16 Sep 2009 15:08:26 +0000
parents 0ac7e80ecc76
children b33c75c58ffe
files avcodec.h wavpack.c wmaprodec.c
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avcodec.h	Wed Sep 16 11:29:47 2009 +0000
+++ b/avcodec.h	Wed Sep 16 15:08:26 2009 +0000
@@ -605,6 +605,10 @@
  * Codec can export data for HW decoding (VDPAU).
  */
 #define CODEC_CAP_HWACCEL_VDPAU    0x0080
+/**
+ * Codec can output multiple frames per AVPacket
+ */
+#define CODEC_CAP_SUBFRAMES        0x0100
 
 //The following defines may change, don't expect compatibility if you use them.
 #define MB_TYPE_INTRA4x4   0x0001
--- a/wavpack.c	Wed Sep 16 11:29:47 2009 +0000
+++ b/wavpack.c	Wed Sep 16 15:08:26 2009 +0000
@@ -964,5 +964,6 @@
     NULL,
     NULL,
     wavpack_decode_frame,
+    .capabilities = CODEC_CAP_SUBFRAMES,
     .long_name = NULL_IF_CONFIG_SMALL("WavPack"),
 };
--- a/wmaprodec.c	Wed Sep 16 11:29:47 2009 +0000
+++ b/wmaprodec.c	Wed Sep 16 15:08:26 2009 +0000
@@ -1557,6 +1557,7 @@
     NULL,
     decode_end,
     decode_packet,
+    .capabilities = CODEC_CAP_SUBFRAMES,
     .flush= flush,
     .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"),
 };