[FFmpeg-devel] [PATCH][BUGFIX] old flac in ogg

Michael Niedermayer michaelni
Fri Aug 10 22:55:47 CEST 2007


Hi

the attached patch fixes samples.mplayerhq.hu/flac/Yesterday.ogg
and as such also closes issue73 @ roundup

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
Index: libavformat/ogg2.c
===================================================================
--- libavformat/ogg2.c	(revision 10007)
+++ libavformat/ogg2.c	(working copy)
@@ -41,6 +41,7 @@
     &vorbis_codec,
     &theora_codec,
     &flac_codec,
+    &old_flac_codec,
     &ogm_video_codec,
     &ogm_audio_codec,
     &ogm_old_codec,
Index: libavformat/ogg2.h
===================================================================
--- libavformat/ogg2.h	(revision 10007)
+++ libavformat/ogg2.h	(working copy)
@@ -77,6 +77,7 @@
 extern ogg_codec_t vorbis_codec;
 extern ogg_codec_t theora_codec;
 extern ogg_codec_t flac_codec;
+extern ogg_codec_t old_flac_codec;
 extern ogg_codec_t ogm_video_codec;
 extern ogg_codec_t ogm_audio_codec;
 extern ogg_codec_t ogm_old_codec;
Index: libavformat/oggparseflac.c
===================================================================
--- libavformat/oggparseflac.c	(revision 10007)
+++ libavformat/oggparseflac.c	(working copy)
@@ -75,8 +75,24 @@
     return 1;
 }
 
+static int
+old_flac_header (AVFormatContext * s, int idx)
+{
+    AVStream *st = s->streams[idx];
+    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_id = CODEC_ID_FLAC;
+
+    return 0;
+}
+
 ogg_codec_t flac_codec = {
     .magic = "\177FLAC",
     .magicsize = 5,
     .header = flac_header
 };
+
+ogg_codec_t old_flac_codec = {
+    .magic = "fLaC",
+    .magicsize = 4,
+    .header = old_flac_header
+};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070810/80167047/attachment.pgp>



More information about the ffmpeg-devel mailing list