aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tta.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-03-30 22:10:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-03-30 22:10:25 +0000
commit09a628662dbe068d4902a910ac630260fd321efa (patch)
treea2183fe71411559f79c566758ebad08d9d875de2 /libavformat/tta.c
parent8ec491e3fd663a81bea214f81f79f53aa84f9d39 (diff)
downloadffmpeg-09a628662dbe068d4902a910ac630260fd321efa.tar.gz
argh, who commited this trash
start must be 0 ... Originally committed as revision 8563 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/tta.c')
-rw-r--r--libavformat/tta.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 8610ce849b..663cd1b6e9 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -40,9 +40,7 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
TTAContext *c = s->priv_data;
AVStream *st;
- int i, channels, bps, samplerate, datalen, framelen, start;
-
- start = url_ftell(&s->pb);
+ int i, channels, bps, samplerate, datalen, framelen;
if (get_le32(&s->pb) != ff_get_fourcc("TTA1"))
return -1; // not tta file
@@ -90,14 +88,14 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->sample_rate = samplerate;
st->codec->bits_per_sample = bps;
- st->codec->extradata_size = url_ftell(&s->pb) - start;
+ st->codec->extradata_size = url_ftell(&s->pb);
if(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)st->codec->extradata_size){
//this check is redundant as get_buffer should fail
av_log(s, AV_LOG_ERROR, "extradata_size too large\n");
return -1;
}
st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
- url_fseek(&s->pb, start, SEEK_SET); // or SEEK_CUR and -size ? :)
+ url_fseek(&s->pb, 0, SEEK_SET);
get_buffer(&s->pb, st->codec->extradata, st->codec->extradata_size);
return 0;