James Almer
d59d39e164
wavdec: fix duration calculation for files with invalid data size
...
Some wav files report a data size that is bigger than the actual file size.
Fall back to estimation from bitrate in such cases.
Fixes ticket #2065 .
Signed-off-by: James Almer <jamrial@gmail.com>
12 years ago
Michael Niedermayer
09456d0df1
riff: ignore ff_read_riff_info() failure.
...
Some files simply contain invalid info tags.
Fixes unrelated bug posted into Ticket1821
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
a43283b6f4
wavdec: check size before reading the data, not after.
12 years ago
Anton Khirnov
79922d7237
wav: do not fail on empty INFO tags
...
Fixes Bug 379
CC: libav-stable@libav.org
12 years ago
Anton Khirnov
31c54711cc
lavf: split wav muxer and demuxer into separate files.
12 years ago
Victor Vasiliev
58b619c8a2
wav muxer: write metadata
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Michael Niedermayer
697b476c07
wav: Fix DTS detection
...
Fixes Ticket1474
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
13 years ago
Diego Biurrun
6774247a9d
avformat: Drop pointless "format" from container long names
13 years ago
Michael Niedermayer
4e7f9ebdc2
wav: switch to AVSTREAM_PARSE_FULL_RAW
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
61884b9d1b
wav: init st to NULL to avoid a false-positive warning.
...
If st is NULL, it means no 'fmt ' tag is found, but 'data' tag (which
needs a previous 'fmt ' tag to be parsed correctly and st initialized)
check will make sure st is never dereferenced in that case.
Fixes warning:
libavformat/wav.c: In function ‘wav_read_header’:
libavformat/wav.c:499:44: warning: ‘st’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
13 years ago
Derek Buitenhuis
5ab855777d
wav: Add check for 'fmt' tag in SMV code
...
If there is a 'SMV0' tag, but no 'fmt' tag, it is possible that
'st' got used as NULL.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
13 years ago
James Zern
e9cef89702
avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Martin Storsjö
20234a4bd7
cosmetics: Align muxer/demuxer declarations
...
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
167f3b8de7
libavformat: Add an ff_ prefix to some lavf internal symbols
...
Prefix the functions/tables brktimegm, pcm_read_seek,
dv_offset_reset, voc_get_packet, codec_movaudio_tags,
codec_movvideo_tags.
After this, lavf has no global symbols without the proper prefix.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
6e9651d106
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
13 years ago
Carl Eugen Hoyos
7862bd3d4a
Cosmetics: Improve 'too short LIST' error message in wav.c.
13 years ago
Carl Eugen Hoyos
a8e93ce4cb
Do not reject LIST tags in wav with size 4.
...
Fixes ticket #745 .
13 years ago
Michael Niedermayer
02acfb1c01
wavdec: add ignore length option to ignore incorrect lengthes
...
like SOX
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
935ac228e4
Fix typo: Correctly parse 64 byte umid tags in bext metadata.
13 years ago
Clément Bœsch
215b7724e7
lavf: rename remaining av_set_pts_info() to avpriv_set_pts_info().
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Victor Vasiliev
12bc20502a
Generalize RIFF INFO tag support; support reading INFO tag in wav
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Clément Bœsch
2f0f9a87d0
Fix various if parenthesis misplacements.
13 years ago
Clément Bœsch
0e5ecd806e
Replace remaining av_new_stream() with avformat_new_stream().
13 years ago
Anton Khirnov
3b3bbdd3e6
lavf,lavd: replace av_new_stream->avformat_new_stream part I.
...
Trivial replacements with sed are done in this commit:
sed 's/av_new_stream(\([^)]*\), 0)/avformat_new_stream(\1, NULL)/'
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Reimar Döffinger
4b4a6ebd68
Support playing SMV files.
...
Audio and video are interleaved via stream cur_dts - no idea how
reliable this is.
It also cannot display the video properly - it is stored with
about 15 in a single JPEG frame, I cannot think of a reasonable
way to implement this.
Samples: http://samples.mplayerhq.hu/smv/
Format description: http://wiki.multimedia.cx/index.php?title=SMV
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Clément Bœsch
3dd2c8bbbc
wav: init st to NULL to avoid a false-positive warning.
...
If st is NULL, it means no 'fmt ' tag is found, but 'data' tag (which
needs a previous 'fmt ' tag to be parsed correctly and st initialized)
check will make sure st is never dereferenced in that case.
14 years ago
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Anton Khirnov
6270995667
wav: remove a use of deprecated AV_METADATA_ macro
14 years ago
Tomas Härdin
b21e6b707f
wav: parse 'bext' metadata
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Tomas Härdin
67b1761fcb
wav: keep parsing until EOF if the input is seekable and we know the size of the data tag
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Tomas Härdin
90f2ee8cb4
wav: Refactor the tag checking into a switch statement
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Tomas Härdin
1cf18de982
wav: make sure neither data_size nor sample_count is negative.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Tomas Härdin
7f84055e2d
wav: refactor the 'fmt ' tag search and parsing.
...
Moving the search and parsing of the 'fmt ' info the main loop of
wav_read_header() allows tags that precede it to be parsed. Creating
wav_parse_fmt_tag() makes wav_read_header() easier to read.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Benjamin Larsson
a4ad943860
wav: add an option for writing BEXT chunk
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Mans Rullgard
0ebcdf5cda
Do not include mathematics.h in avutil.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Carl Eugen Hoyos
8d0786ec6d
wav: remove an invalid free().
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Aurelien Jacobs
e6ba3d4281
replace remaining usage of deprecated av_metadata_set2() by av_dict_set()
14 years ago
Michael Niedermayer
c9614bb22c
wav: update size check for ds64
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Philip de Nier
e472f0ea5a
wav: fix skip size at end of ds64 chunk
14 years ago
Tomas Härdin
f86d260df3
wav: Don't avio_seek() if we know we'll run into EOF
...
Since we want to break the loop the 'if (data_ofs < 0)' block is moved after the loop.
This fixes ticket #250 .
14 years ago
Tomas Härdin
2660e9e1f3
Add metadata conversion table to the wav demuxer
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Stefano Sabatini
8d953175d4
wav: fix various printf warnings related to wrong argument type
14 years ago
Stefano Sabatini
e9f4001a30
wav: propagate ff_get_wav_header() error code in w64_read_header()
...
Alos fix warning:
wav.c: In function ‘w64_read_header’:
wav.c:546: warning: ‘ret’ may be used uninitialized in this function
14 years ago
Tomas Härdin
7e5cb2ef51
Parse 'bext' metadata in the wav demuxer
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Tomas Härdin
40612f2601
Cosmetics: indent
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago