diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-02-10 00:38:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-02-10 01:20:07 +0100 |
commit | 8c6ebab747ca8311b81ff4d0a7c17ef60b372f32 (patch) | |
tree | 677444f33cd2ee65df88809ca820ed57d2077ca3 /libavformat/wv.c | |
parent | ea4037162fb0afa871e5312a7b23c828d2b85066 (diff) | |
parent | c57fe49da8feda7d2e6c266978250a15a83e0484 (diff) | |
download | ffmpeg-8c6ebab747ca8311b81ff4d0a7c17ef60b372f32.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (26 commits)
eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation
yadif: specify array size outside DECLARE_ALIGNED
prores: specify array size outside DECLARE_ALIGNED brackets.
WavPack demuxer: set packet duration
tta: use skip_bits_long()
mxfdec: Ignore the last entry in Avid's index table segments
mxfdec: Sanity-check SampleRate
mxfdec: Handle small EditUnitByteCount
mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a
mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
mxfdec: Sanity check PreviousPartition
mxfdec: Never seek back in local sets and KLVs
mxfdec: Move the current_partition check inside mxf_read_header()
mxfdec: Fix infinite loop in mxf_packet_timestamps()
mxfdec: Check eof_reached in mxf_read_local_tags()
mxfdec: Check for NULL component
mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
mxfdec: Make sure x < index_table->nb_ptses
build: Add missing directories to DIRS declarations.
...
Conflicts:
doc/build_system.txt
doc/fate.texi
libavfilter/x86/yadif_template.c
libavformat/mxfdec.c
libavutil/Makefile
tests/fate/audio.mak
tests/fate/prores.mak
tests/fate/screen.mak
tests/fate/video.mak
tests/ref/fate/bethsoft-vid
tests/ref/fate/cscd
tests/ref/fate/dfa4
tests/ref/fate/nuv
tests/ref/fate/vp8-sign-bias
tests/ref/fate/wmv8-drm
tests/ref/lavf/gxf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/wv.c')
-rw-r--r-- | libavformat/wv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/wv.c b/libavformat/wv.c index 537fdec583..767f4f48ef 100644 --- a/libavformat/wv.c +++ b/libavformat/wv.c @@ -251,6 +251,7 @@ static int wv_read_packet(AVFormatContext *s, int ret; int size, ver, off; int64_t pos; + uint32_t block_samples; if (url_feof(s->pb)) return AVERROR(EIO); @@ -316,6 +317,12 @@ static int wv_read_packet(AVFormatContext *s, pkt->stream_index = 0; wc->block_parsed = 1; pkt->pts = wc->soff; + block_samples = AV_RN32(wc->extra); + if (block_samples > INT32_MAX) + av_log(s, AV_LOG_WARNING, "Too many samples in block: %"PRIu32"\n", block_samples); + else + pkt->duration = block_samples; + av_add_index_entry(s->streams[0], pos, pkt->pts, 0, 0, AVINDEX_KEYFRAME); return 0; } |