]> git.sesse.net Git - vlc/commitdiff
* modules/codec/ffmpeg/ffmpeg.c, modules/demux/ogg.c: theora decoding support via...
authorGildas Bazin <gbazin@videolan.org>
Tue, 16 Dec 2003 12:38:18 +0000 (12:38 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 16 Dec 2003 12:38:18 +0000 (12:38 +0000)
modules/codec/ffmpeg/ffmpeg.c
modules/demux/ogg.c

index 481248651181c6ac584265061e5232eeb7b339bb..136ec64c936a9a4bc265cf422994fa9f86aa44b2 100644 (file)
@@ -2,7 +2,7 @@
  * ffmpeg.c: video decoder using ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ffmpeg.c,v 1.67 2003/12/01 09:39:04 fenrir Exp $
+ * $Id: ffmpeg.c,v 1.68 2003/12/16 12:38:18 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -473,6 +473,15 @@ int E_(GetFfmpegCodec)( vlc_fourcc_t i_fourcc, int *pi_cat,
         psz_name = "On2's VP3 Video";
         break;
 
+#if LIBAVCODEC_BUILD >= 4685
+    /* Xiph.org theora */
+    case VLC_FOURCC('t','h','e','o'):
+        i_cat    = VIDEO_ES;
+        i_codec  = CODEC_ID_THEORA;
+        psz_name = "Xiph.org's Theora Video";
+        break;
+#endif
+
 #if ( !defined( WORDS_BIGENDIAN ) )
     /* Asus Video (Another thing that doesn't work on PPC) */
     case VLC_FOURCC('A','S','V','1'):
index 37b4d8c637d303165974f968b1f5a8687617e61c..d01eae8ab8b0a821ebf8f13d4ae56a1965cabd4e 100644 (file)
@@ -2,7 +2,7 @@
  * ogg.c : ogg stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: ogg.c,v 1.50 2003/12/15 23:31:11 gbazin Exp $
+ * $Id: ogg.c,v 1.51 2003/12/16 12:38:18 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -683,6 +683,12 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg)
                     msg_Dbg( p_input,
                              "found theora header, bitrate: %i, rate: %f",
                              p_stream->fmt.i_bitrate, p_stream->f_rate );
+
+                    /* Save this data in p_extra for ffmpeg */
+                    p_stream->fmt.i_extra = oggpacket.bytes;
+                    p_stream->fmt.p_extra = malloc( oggpacket.bytes );
+                    memcpy( p_stream->fmt.p_extra,
+                            oggpacket.packet, oggpacket.bytes );
                 }
                 /* Check for Tarkin header */
                 else if( oggpacket.bytes >= 7 &&