[MPlayer-dev-eng] [PATCH] FLAC-in-Ogg

Moritz Bunkus moritz at bunkus.org
Sat Nov 15 21:00:45 CET 2003


Hi,

for your information: I've just committed the attached patch to
demux_ogg.c which enables FLAC-in-Ogg. It's really simple, but read my
comments what I think about it.

-- 
 ==> Ciao, Mosu (Moritz Bunkus)
-------------- next part --------------
Index: demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.36
diff -u -r1.36 demux_ogg.c
--- demux_ogg.c	15 Oct 2003 16:46:55 -0000	1.36
+++ demux_ogg.c	15 Nov 2003 19:59:15 -0000
@@ -408,9 +408,11 @@
   }
   // If packet is an header we jump it except for vorbis and theora
   // (PACKET_TYPE_HEADER bit doesn't even exist for theora ?!)
-  if((*pack->packet & PACKET_TYPE_HEADER) && 
+  // We jump nothing for FLAC. Ain't this great? Packet contents have to be
+  // handled differently for each and every stream type. The joy! The joy!
+  if(!os->flac && ((*pack->packet & PACKET_TYPE_HEADER) && 
      (ds != d->audio || ( ((sh_audio_t*)ds->sh)->format != 0xFFFE || os->hdr_packets >= NUM_VORBIS_HDR_PACKETS ) ) &&
-     (ds != d->video || (((sh_video_t*)ds->sh)->format != 0xFFFC)))
+     (ds != d->video || (((sh_video_t*)ds->sh)->format != 0xFFFC))))
     return 0;
 
   // For vorbis packet the packet is the data, for other codec we must jump
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20031115/d80369b1/attachment.pgp>


More information about the MPlayer-dev-eng mailing list