avformat/rawdec: add FF_DEF_RAWVIDEO_DEMUXER2, which allows specifying the flags
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 10 Jun 2014 12:20:39 +0000 (14:20 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 10 Jun 2014 12:20:39 +0000 (14:20 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rawdec.h

index 5910855..328a4fb 100644 (file)
@@ -49,7 +49,7 @@ static const AVClass name ## _demuxer_class = {\
     .version    = LIBAVUTIL_VERSION_INT,\
 };
 
-#define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\
+#define FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, flag)\
 FF_RAWVIDEO_DEMUXER_CLASS(shortname)\
 AVInputFormat ff_ ## shortname ## _demuxer = {\
     .name           = #shortname,\
@@ -58,10 +58,13 @@ AVInputFormat ff_ ## shortname ## _demuxer = {\
     .read_header    = ff_raw_video_read_header,\
     .read_packet    = ff_raw_read_partial_packet,\
     .extensions     = ext,\
-    .flags          = AVFMT_GENERIC_INDEX,\
+    .flags          = flag,\
     .raw_codec_id   = id,\
     .priv_data_size = sizeof(FFRawVideoDemuxerContext),\
     .priv_class     = &shortname ## _demuxer_class,\
 };
 
+#define FF_DEF_RAWVIDEO_DEMUXER(shortname, longname, probe, ext, id)\
+FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, AVFMT_GENERIC_INDEX)
+
 #endif /* AVFORMAT_RAWDEC_H */