From 880e3ef41311c036892e4e0688e58418505886a3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 12 Aug 2007 09:29:39 +0000 Subject: add support for old flac in ogg fixes samples.mplayerhq.hu/flac/Yesterday.ogg closes issue73 Originally committed as revision 10088 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/oggparseflac.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libavformat/oggparseflac.c') diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c index b2bdcd4dcd..d8eff05b0f 100644 --- a/libavformat/oggparseflac.c +++ b/libavformat/oggparseflac.c @@ -75,8 +75,24 @@ flac_header (AVFormatContext * s, int idx) 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 +}; -- cgit v1.2.3