[FFmpeg-cvslog] r10088 - in trunk/libavformat: ogg2.c ogg2.h oggparseflac.c
michael
subversion
Sun Aug 12 11:29:39 CEST 2007
Author: michael
Date: Sun Aug 12 11:29:39 2007
New Revision: 10088
Log:
add support for old flac in ogg
fixes samples.mplayerhq.hu/flac/Yesterday.ogg
closes issue73
Modified:
trunk/libavformat/ogg2.c
trunk/libavformat/ogg2.h
trunk/libavformat/oggparseflac.c
Modified: trunk/libavformat/ogg2.c
==============================================================================
--- trunk/libavformat/ogg2.c (original)
+++ trunk/libavformat/ogg2.c Sun Aug 12 11:29:39 2007
@@ -41,6 +41,7 @@ static ogg_codec_t *ogg_codecs[] = {
&vorbis_codec,
&theora_codec,
&flac_codec,
+ &old_flac_codec,
&ogm_video_codec,
&ogm_audio_codec,
&ogm_old_codec,
Modified: trunk/libavformat/ogg2.h
==============================================================================
--- trunk/libavformat/ogg2.h (original)
+++ trunk/libavformat/ogg2.h Sun Aug 12 11:29:39 2007
@@ -77,6 +77,7 @@ typedef struct ogg {
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;
Modified: trunk/libavformat/oggparseflac.c
==============================================================================
--- trunk/libavformat/oggparseflac.c (original)
+++ trunk/libavformat/oggparseflac.c Sun Aug 12 11:29:39 2007
@@ -75,8 +75,24 @@ flac_header (AVFormatContext * s, int id
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
+};
More information about the ffmpeg-cvslog
mailing list