[Ffmpeg-devel] [PATCH] VC-1 ES demuxer

Kostya kostya.shishkov
Fri Feb 9 08:28:15 CET 2007


Here is a trivial patch which enables reading VC-1 raw files.
-------------- next part --------------
Index: libavformat/raw.c
===================================================================
--- libavformat/raw.c	(revision 7818)
+++ libavformat/raw.c	(working copy)
@@ -688,6 +688,18 @@
 };
 #endif //CONFIG_MUXERS
 
+AVInputFormat vc1_demuxer = {
+    "vc1",
+    "raw vc1",
+    0,
+    NULL /* vc1_probe */,
+    video_read_header,
+    raw_read_partial_packet,
+    raw_read_close,
+    .extensions = "vc1",
+    .value = CODEC_ID_VC1,
+};
+
 /* pcm formats */
 
 #define PCMINPUTDEF(name, long_name, ext, codec) \
Index: libavformat/allformats.c
===================================================================
--- libavformat/allformats.c	(revision 7818)
+++ libavformat/allformats.c	(working copy)
@@ -143,6 +143,7 @@
     REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
     REGISTER_DEMUXER (TTA, tta);
     REGISTER_DEMUXER (V4L2, v4l2);
+    REGISTER_DEMUXER (VC1, vc1);
     REGISTER_DEMUXER (VIDEO_GRAB_DEVICE, video_grab_device);
     REGISTER_DEMUXER (VMD, vmd);
     REGISTER_MUXDEMUX(VOC, voc);
Index: libavformat/allformats.h
===================================================================
--- libavformat/allformats.h	(revision 7818)
+++ libavformat/allformats.h	(working copy)
@@ -153,6 +153,7 @@
 extern AVOutputFormat swf_muxer;
 extern AVInputFormat tta_demuxer;
 extern AVInputFormat v4l2_demuxer;
+extern AVInputFormat vc1_demuxer;
 extern AVInputFormat voc_demuxer;
 extern AVOutputFormat voc_muxer;
 extern AVInputFormat wav_demuxer;



More information about the ffmpeg-devel mailing list