[FFmpeg-cvslog] r19881 - in trunk: ffmpeg.c libavcodec/avcodec.h libavcodec/wavpack.c libavcodec/wmaprodec.c
faust3
subversion
Wed Sep 16 17:08:26 CEST 2009
Author: faust3
Date: Wed Sep 16 17:08:26 2009
New Revision: 19881
Log:
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)
Modified:
trunk/ffmpeg.c
trunk/libavcodec/avcodec.h
trunk/libavcodec/wavpack.c
trunk/libavcodec/wmaprodec.c
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c Wed Sep 16 14:45:24 2009 (r19880)
+++ trunk/ffmpeg.c Wed Sep 16 17:08:26 2009 (r19881)
@@ -1280,7 +1280,8 @@ static int output_packet(AVInputStream *
handle_eof:
ist->pts= ist->next_pts;
- if(avpkt.size && avpkt.size != pkt->size && verbose>0)
+ if(avpkt.size && avpkt.size != pkt->size &&
+ !(ist->st->codec->codec->capabilities & CODEC_CAP_SUBFRAMES) && verbose>0)
fprintf(stderr, "Multiple frames in a packet from stream %d\n", pkt->stream_index);
/* decode the packet if needed */
Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h Wed Sep 16 14:45:24 2009 (r19880)
+++ trunk/libavcodec/avcodec.h Wed Sep 16 17:08:26 2009 (r19881)
@@ -605,6 +605,10 @@ typedef struct RcOverride{
* 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
Modified: trunk/libavcodec/wavpack.c
==============================================================================
--- trunk/libavcodec/wavpack.c Wed Sep 16 14:45:24 2009 (r19880)
+++ trunk/libavcodec/wavpack.c Wed Sep 16 17:08:26 2009 (r19881)
@@ -964,5 +964,6 @@ AVCodec wavpack_decoder = {
NULL,
NULL,
wavpack_decode_frame,
+ .capabilities = CODEC_CAP_SUBFRAMES,
.long_name = NULL_IF_CONFIG_SMALL("WavPack"),
};
Modified: trunk/libavcodec/wmaprodec.c
==============================================================================
--- trunk/libavcodec/wmaprodec.c Wed Sep 16 14:45:24 2009 (r19880)
+++ trunk/libavcodec/wmaprodec.c Wed Sep 16 17:08:26 2009 (r19881)
@@ -1557,6 +1557,7 @@ AVCodec wmapro_decoder = {
NULL,
decode_end,
decode_packet,
+ .capabilities = CODEC_CAP_SUBFRAMES,
.flush= flush,
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"),
};
More information about the ffmpeg-cvslog
mailing list