]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ogg.c
Original X11 device demuxer patch from Clemens Fruhwirth
[ffmpeg] / libavformat / ogg.c
index 37158981ae536c8cf75e4f982543fc53f8d6ab61..369fa4639de6bf588291109773e78dca6c3a17ee 100644 (file)
@@ -4,6 +4,22 @@
  *
  * Uses libogg, but requires libvorbisenc to construct correct headers
  * when containing Vorbis stream -- currently the only format supported
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <stdio.h>
@@ -137,7 +153,7 @@ static int ogg_write_trailer(AVFormatContext *avfcontext) {
 }
 
 
-static AVOutputFormat ogg_oformat = {
+AVOutputFormat ogg_muxer = {
     "ogg",
     "Ogg Vorbis",
     "audio/x-vorbis",
@@ -238,7 +254,7 @@ static int ogg_read_packet(AVFormatContext *avfcontext, AVPacket *pkt) {
     memcpy(pkt->data, op.packet, op.bytes);
     if(avfcontext->streams[0]->codec.sample_rate && op.granulepos!=-1)
         pkt->pts= av_rescale(op.granulepos, AV_TIME_BASE, avfcontext->streams[0]->codec.sample_rate);
-//    printf("%lld %d %d\n", pkt->pts, (int)op.granulepos, avfcontext->streams[0]->codec.sample_rate);
+//    printf("%"PRId64" %d %d\n", pkt->pts, (int)op.granulepos, avfcontext->streams[0]->codec.sample_rate);
 
     return op.bytes;
 }
@@ -265,11 +281,3 @@ static AVInputFormat ogg_iformat = {
     .extensions = "ogg",
 } ;
 #endif
-
-int libogg_init(void) {
-#ifdef CONFIG_MUXERS
-    av_register_output_format(&ogg_oformat) ;
-#endif
-/*     av_register_input_format(&ogg_iformat); */
-    return 0 ;
-}