WAV chunks must be even aligned. This patch skip the extra padding byte
if chunk size is odd.
Fixes ticket #2417.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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>
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>
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>
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>
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>
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.
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>