diff options
author | Måns Rullgård <mans@mansr.com> | 2006-07-10 21:14:37 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-07-10 21:14:37 +0000 |
commit | ff70e60176056daf646109b8e42654a3036fa02b (patch) | |
tree | 42e32d1e4bff334964cf93766ff2da6ee9a8f1d3 /libavformat/crc.c | |
parent | 4cac0d5589ab1a076e977425925015f2c8e591a8 (diff) | |
download | ffmpeg-ff70e60176056daf646109b8e42654a3036fa02b.tar.gz |
allow individual selection of muxers and demuxers
Originally committed as revision 5707 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/crc.c')
-rw-r--r-- | libavformat/crc.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/libavformat/crc.c b/libavformat/crc.c index 40c181007a..2176d47d90 100644 --- a/libavformat/crc.c +++ b/libavformat/crc.c @@ -56,8 +56,8 @@ unsigned long update_adler32(unsigned long adler, const uint8_t *buf, unsigned i } return (s2 << 16) | s1; } -#ifdef CONFIG_MUXERS +#ifdef CONFIG_CRC_MUXER typedef struct CRCState { uint32_t crcval; } CRCState; @@ -89,7 +89,9 @@ static int crc_write_trailer(struct AVFormatContext *s) put_flush_packet(&s->pb); return 0; } +#endif +#ifdef CONFIG_FRAMECRC_MUXER static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt) { uint32_t crc = update_adler32(0, pkt->data, pkt->size); @@ -100,8 +102,10 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt) put_flush_packet(&s->pb); return 0; } +#endif -static AVOutputFormat crc_muxer = { +#ifdef CONFIG_CRC_MUXER +AVOutputFormat crc_muxer = { "crc", "crc testing format", NULL, @@ -113,8 +117,9 @@ static AVOutputFormat crc_muxer = { crc_write_packet, crc_write_trailer, }; - -static AVOutputFormat framecrc_muxer = { +#endif +#ifdef CONFIG_FRAMECRC_MUXER +AVOutputFormat framecrc_muxer = { "framecrc", "framecrc testing format", NULL, @@ -126,11 +131,4 @@ static AVOutputFormat framecrc_muxer = { framecrc_write_packet, NULL, }; - -int crc_init(void) -{ - av_register_output_format(&crc_muxer); - av_register_output_format(&framecrc_muxer); - return 0; -} -#endif /* CONFIG_MUXERS */ +#endif |