diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-03-01 03:05:13 +0100 |
commit | 1d0b3b20c34517b9d1ddf3ea347776304b0c4b44 (patch) | |
tree | 89f4fc640c2becc6f00ae08996754952ecf149c1 /contrib/ffmpeg/libavformat/au.c | |
parent | 09496ad3469a0ade8dbd9a351e639b78f20b7942 (diff) | |
download | xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.gz xine-lib-1d0b3b20c34517b9d1ddf3ea347776304b0c4b44.tar.bz2 |
Update internal FFmpeg copy.
Diffstat (limited to 'contrib/ffmpeg/libavformat/au.c')
-rw-r--r-- | contrib/ffmpeg/libavformat/au.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/contrib/ffmpeg/libavformat/au.c b/contrib/ffmpeg/libavformat/au.c index 9e84c9d31..c6d5026e9 100644 --- a/contrib/ffmpeg/libavformat/au.c +++ b/contrib/ffmpeg/libavformat/au.c @@ -28,7 +28,7 @@ */ #include "avformat.h" -#include "allformats.h" +#include "raw.h" #include "riff.h" /* if we don't know the size in advance */ @@ -37,6 +37,7 @@ /* The ffmpeg codecs we support, and the IDs they have in the file */ static const AVCodecTag codec_au_tags[] = { { CODEC_ID_PCM_MULAW, 1 }, + { CODEC_ID_PCM_S8, 2 }, { CODEC_ID_PCM_S16BE, 3 }, { CODEC_ID_PCM_ALAW, 27 }, { 0, 0 }, @@ -59,7 +60,7 @@ static int put_au_header(ByteIOContext *pb, AVCodecContext *enc) static int au_write_header(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; s->priv_data = NULL; @@ -75,17 +76,17 @@ static int au_write_header(AVFormatContext *s) static int au_write_packet(AVFormatContext *s, AVPacket *pkt) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; put_buffer(pb, pkt->data, pkt->size); return 0; } static int au_write_trailer(AVFormatContext *s) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; offset_t file_size; - if (!url_is_streamed(&s->pb)) { + if (!url_is_streamed(s->pb)) { /* update file size */ file_size = url_ftell(pb); @@ -103,8 +104,6 @@ static int au_write_trailer(AVFormatContext *s) static int au_probe(AVProbeData *p) { /* check file header */ - if (p->buf_size <= 24) - return 0; if (p->buf[0] == '.' && p->buf[1] == 's' && p->buf[2] == 'n' && p->buf[3] == 'd') return AVPROBE_SCORE_MAX; @@ -118,7 +117,7 @@ static int au_read_header(AVFormatContext *s, { int size; unsigned int tag; - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; unsigned int id, codec, channels, rate; AVStream *st; @@ -160,11 +159,11 @@ static int au_read_packet(AVFormatContext *s, { int ret; - if (url_feof(&s->pb)) - return AVERROR_IO; - ret= av_get_packet(&s->pb, pkt, MAX_SIZE); + if (url_feof(s->pb)) + return AVERROR(EIO); + ret= av_get_packet(s->pb, pkt, MAX_SIZE); if (ret < 0) - return AVERROR_IO; + return AVERROR(EIO); pkt->stream_index = 0; /* note: we need to modify the packet size here to handle the last |