summaryrefslogtreecommitdiff
path: root/contrib/ffmpeg/libavformat/oggparseflac.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-03-01 03:05:13 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-03-01 03:05:13 +0100
commit1d0b3b20c34517b9d1ddf3ea347776304b0c4b44 (patch)
tree89f4fc640c2becc6f00ae08996754952ecf149c1 /contrib/ffmpeg/libavformat/oggparseflac.c
parent09496ad3469a0ade8dbd9a351e639b78f20b7942 (diff)
downloadxine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.gz
xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.bz2
Update internal FFmpeg copy.
Diffstat (limited to 'contrib/ffmpeg/libavformat/oggparseflac.c')
-rw-r--r--contrib/ffmpeg/libavformat/oggparseflac.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/contrib/ffmpeg/libavformat/oggparseflac.c b/contrib/ffmpeg/libavformat/oggparseflac.c
index 8960088d8..611a8c5a1 100644
--- a/contrib/ffmpeg/libavformat/oggparseflac.c
+++ b/contrib/ffmpeg/libavformat/oggparseflac.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include "avformat.h"
#include "bitstream.h"
-#include "ogg2.h"
+#include "oggdec.h"
#define FLAC_STREAMINFO_SIZE 0x22
@@ -49,7 +49,7 @@ flac_header (AVFormatContext * s, int idx)
skip_bits(&gb, 4*8); /* "fLaC" */
/* METADATA_BLOCK_HEADER */
- if (get_bits(&gb, 32) != FLAC_STREAMINFO_SIZE)
+ if (get_bits_long(&gb, 32) != FLAC_STREAMINFO_SIZE)
return -1;
skip_bits(&gb, 16*2+24*2);
@@ -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
+};