diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-12-08 12:18:23 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-12-09 22:01:00 +0000 |
commit | cef28b56027c3c9ca2359a50741fc5312d627ef8 (patch) | |
tree | c8dd1fe2b4f5397793841e0a4fca4fb72180fb7d /libavformat | |
parent | 461b5bf4abf70f8b8baba01812682c77512d079c (diff) | |
download | ffmpeg-cef28b56027c3c9ca2359a50741fc5312d627ef8.tar.gz |
tak: reduce difference with qatar
Mostly cosmetics changes, but also makes
decoding little faster here.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/takdec.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/libavformat/takdec.c b/libavformat/takdec.c index 86d98803ab..377c10c1ab 100644 --- a/libavformat/takdec.c +++ b/libavformat/takdec.c @@ -26,8 +26,8 @@ #include "apetag.h" typedef struct TAKDemuxContext { - int mlast_frame; - int64_t data_end; + int mlast_frame; + int64_t data_end; } TAKDemuxContext; static int tak_probe(AVProbeData *p) @@ -40,7 +40,7 @@ static int tak_probe(AVProbeData *p) static int tak_read_header(AVFormatContext *s) { TAKDemuxContext *tc = s->priv_data; - AVIOContext *pb = s->pb; + AVIOContext *pb = s->pb; GetBitContext gb; AVStream *st; uint8_t *buffer = NULL; @@ -95,7 +95,7 @@ static int tak_read_header(AVFormatContext *s) av_log(s, AV_LOG_VERBOSE, "%02x", md5[i]); av_log(s, AV_LOG_VERBOSE, "\n"); break; - } + } case TAK_METADATA_END: { int64_t curpos = avio_tell(pb); @@ -106,8 +106,7 @@ static int tak_read_header(AVFormatContext *s) tc->data_end += curpos; return 0; - break; - } + } default: ret = avio_skip(pb, size); if (ret < 0) @@ -123,19 +122,19 @@ static int tak_read_header(AVFormatContext *s) st->codec->bits_per_coded_sample = ti.bps; if (ti.ch_layout) st->codec->channel_layout = ti.ch_layout; - st->codec->sample_rate = ti.sample_rate; - st->codec->channels = ti.channels; - st->start_time = 0; + st->codec->sample_rate = ti.sample_rate; + st->codec->channels = ti.channels; + st->start_time = 0; avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); - st->codec->extradata = buffer; - st->codec->extradata_size = size; - buffer = NULL; + st->codec->extradata = buffer; + st->codec->extradata_size = size; + buffer = NULL; } else if (type == TAK_METADATA_LAST_FRAME) { if (size != 11) return AVERROR_INVALIDDATA; tc->mlast_frame = 1; - tc->data_end = get_bits64(&gb, TAK_LAST_FRAME_POS_BITS) + - get_bits(&gb, TAK_LAST_FRAME_SIZE_BITS); + tc->data_end = get_bits64(&gb, TAK_LAST_FRAME_POS_BITS) + + get_bits(&gb, TAK_LAST_FRAME_SIZE_BITS); av_freep(&buffer); } else if (type == TAK_METADATA_ENCODER) { av_log(s, AV_LOG_VERBOSE, "encoder version: %0X\n", |