diff crc.c @ 1169:d18cc9a1fd02 libavformat

allow individual selection of muxers and demuxers
author mru
date Mon, 10 Jul 2006 21:14:37 +0000
parents d89d7ef290da
children bfea7dcd2698
line wrap: on
line diff
--- a/crc.c	Mon Jul 10 12:10:10 2006 +0000
+++ b/crc.c	Mon Jul 10 21:14:37 2006 +0000
@@ -56,8 +56,8 @@
     }
     return (s2 << 16) | s1;
 }
-#ifdef CONFIG_MUXERS
 
+#ifdef CONFIG_CRC_MUXER
 typedef struct CRCState {
     uint32_t crcval;
 } CRCState;
@@ -89,7 +89,9 @@
     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 @@
     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 @@
     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 @@
     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