aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/vocdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-16 12:37:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-16 12:38:56 +0200
commitff0a382758b89180605554755c4bb3f29ea7e8f8 (patch)
tree75902f6a7da6d8f761da101506e3acbc5ca8fe5c /libavformat/vocdec.c
parentcfa909ef5b7e0320f75cca10d932631fb03b49af (diff)
parent5bbfe193a0a41bd2adb648c8c3f6901a575734a2 (diff)
downloadffmpeg-ff0a382758b89180605554755c4bb3f29ea7e8f8.tar.gz
Merge commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2'
* commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2': vocdec: Don't update codec parameters mid-stream Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/vocdec.c')
-rw-r--r--libavformat/vocdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 62215fc735..ceec81f51e 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -91,11 +91,11 @@ ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
if (sample_rate)
dec->sample_rate = sample_rate;
avpriv_set_pts_info(st, 64, 1, dec->sample_rate);
+ dec->channels = channels;
+ dec->bits_per_coded_sample = av_get_bits_per_sample(dec->codec_id);
} else
avio_skip(pb, 1);
- dec->channels = channels;
tmp_codec = avio_r8(pb);
- dec->bits_per_coded_sample = av_get_bits_per_sample(dec->codec_id);
voc->remaining_size -= 2;
max_size -= 2;
channels = 1;
@@ -117,10 +117,10 @@ ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
if (!dec->sample_rate) {
dec->sample_rate = avio_rl32(pb);
avpriv_set_pts_info(st, 64, 1, dec->sample_rate);
+ dec->bits_per_coded_sample = avio_r8(pb);
+ dec->channels = avio_r8(pb);
} else
- avio_skip(pb, 4);
- dec->bits_per_coded_sample = avio_r8(pb);
- dec->channels = avio_r8(pb);
+ avio_skip(pb, 6);
tmp_codec = avio_rl16(pb);
avio_skip(pb, 4);
voc->remaining_size -= 12;