Add ff_id3v2_read_dict() for parsing without AVFormatContext, but
instead with AVIOContext and AVDictionary.
AVFormatContext is still used for logging, if available.
Chapter parsing is the only non-logging functionality that actually
needs AVFormatContext, and AFAICS it should be modified to write the
data to ID3v2ExtraMeta first, from where it can be implanted to
AVFormatContext by a separate function (like it is done with
read_apic() and ff_id3v2_parse_apic()). That is outside the scope of
this patch, though.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f5a04a9b50d_7087_mp3__mp3__tooSmallFinal.mp3
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
compat: msvc: Make sure the object files are included when linking statically
id3v2: check for end of file while unescaping tags
Conflicts:
configure
libavformat/id3v2.c
Note, ffmpeg is not affected by the out of buffer write bug
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'e926b5ceb1962833f0c884a328382bc2eca67aff':
avformat: Drop unnecessary ff_ name prefixes from static functions
Conflicts:
libavformat/audiointerleave.c
libavformat/mux.c
libavformat/mxfenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8d617b11cfc87b2c6056fee029ac5bc760af874a':
id3v2: pad the APIC packets as required by lavc.
dfa: check for invalid access in decode_wdlt().
Conflicts:
libavformat/id3v2.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Makes ff_id3v2_read reset stream position at the end of ID3 data if the
header size is not matched (caused by an EOF for example).
Current behaviour (without the patch):
filesize = 400
id3 data size = 399
file offset after ff_id3v2_read is 400 instead of 399
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Current code would incorrectly process e.g. 'ff 00 ff 00 ff' to
'ff ff ff', while it should be 'ff ff 00 ff'.
Fixes Bug 395.
CC: libav-stable@libav.org
* qatar/master:
lavf: Detect discontinuities in timestamps for framerate/analyzeduration calculation
lavf: Initialize the stream info timestamps in avformat_new_stream
id3v2: Match PIC mimetype/format case-insensitively
configure: Rename check_asm() to more fitting check_inline_asm()
fate: Only test enabled filters
avresample: De-doxygenize some comments where Doxygen is not appropriate
rtmp: split chunk_size var into in_chunk_size and out_chunk_size
rtmp: Factorize the code by adding find_tracked_method
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Some files' embedded art seems to have the mimetype 'image/JPG' instead
of 'image/jpg'. Libav fails to parse those because it matches
case-sensitively.
Use av_strncasecmp() to fix this behaviour.
Signed-off-by: Mohammad Alsaleh <msal@tormail.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
* qatar/master: (23 commits)
build: cosmetics: Reorder some lists in a more logical fashion
x86: pngdsp: Fix assembly for OS/2
fate: add test for RTjpeg in nuv with frameheader
rtmp: send check_bw as notification
g723_1: clip argument for 15-bit version of normalize_bits()
g723_1: use all LPC vectors in formant postfilter
id3v2: Support v2.2 PIC
avplay: fix build with lavfi disabled.
avconv: split configuring filter configuration to a separate file.
avconv: split option parsing into a separate file.
mpc8: do not leave padding after last frame in buffer for the next decode call
mpegaudioenc: list supported channel layouts.
mpegaudiodec: don't print an error on > 1 frame in a packet.
api-example: update to new audio encoding API.
configure: add --enable/disable-random option
doc: cygwin: Update list of FATE package requirements
build: Remove all installed headers and header directories on uninstall
build: change checkheaders to use regular build rules
rtmp: Add a new option 'rtmp_subscribe'
rtmp: Add support for subscribing live streams
...
Conflicts:
Makefile
common.mak
configure
doc/examples/decoding_encoding.c
ffmpeg.c
libavcodec/g723_1.c
libavcodec/mpegaudiodec.c
libavcodec/x86/pngdsp.asm
libavformat/version.h
library.mak
tests/fate/video.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
id3 v2.2 uses image format ("JPG","PNG") instead of mimetypes.
Currently, the attached picture is skipped because the format string
does not match a known picture mimetype.
This patch fixes this behaviour.
Signed-off-by: Mohammad Alsaleh <msal@tormail.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
* qatar/master:
cmutils: include shellapi.h on Win32 (for CommandLineToArgvW).
x86/timer: implement an intrinsic-based version for rdtsc (AV_READ_TIME).
id3v2: add a mimetype for bmp pictures.
flacdec: be less strict when parsing attached pictures.
flacdec: don't create an attached picture stream until we have all information.
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
vsrc_buffer: allow buffering arbitrary number of frames.
vf_scale: avoid a pointless memcpy in no-op conversion.
avfiltergraph: try to reduce format conversions in filters.
avfiltergraph: add an AVClass to AVFilterGraph on next major bump.
id3v2: fix skipping extended header in id3v2.4
Conflicts:
libavfilter/vf_scale.c
libavfilter/vsrc_buffer.c
libavformat/id3v2.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
mp3dec: perform I/S and M/S only when frame mode is joint stereo.
id3v2: add another mimetype for JPEG image
lzw: prevent buffer overreads.
WMAL: Remove inaccurate and unnecessary doxy
h264: fix cabac-on-stack after safe cabac reader.
truemotion2: convert packet header reading to bytestream2.
Conflicts:
libavcodec/lzw.c
libavcodec/truemotion2.c
libavformat/id3v2.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master: (27 commits)
avconv: free packet in write_frame() when discarding due to frame number limit
FATE: use +/- flag option syntax for vp8 emu-edge tests
lavf: make av_interleave_packet_per_dts() private.
lavf: deprecate av_read_packet().
oggdec: output correct timestamps for Vorbis
avconv: pass input stream timestamps to audio encoders
lavc: shrink encoded audio packet size after encoding.
xa: set correct bit rate
xa: do not set bit_rate, block_align, or bits_per_coded_sample
xa: fix end-of-file handling
xa: fix timestamp calculation
bink: fix typo in FFALIGN() argument
bink: align plane width to 8 when calculating bundle sizes
doc: pass -Idoc texi2html and texi2pod
doc: texi2pod: add -I flag
movenc: Add a min_frag_duration option
rtsp: Set the default delay to 0.1 s for the RTSP/SDP/RTP demuxers
libavformat: Set the default for the max_delay option to -1
Generate manpages for AV{Format,Codec}Context AVOptions.
doc/avconv: remove entries for AVOptions.
...
Conflicts:
doc/Makefile
doc/ffmpeg.texi
doc/muxers.texi
ffmpeg.c
libavcodec/Makefile
libavcodec/options.c
libavcodec/vp8.c
libavformat/options.c
tests/fate/demux.mak
tests/ref/fate/truemotion1-15
tests/ref/fate/truemotion1-24
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master: (58 commits)
amrnbdec: check frame size before decoding.
cscd: use negative error values to indicate decode_init() failures.
h264: prevent overreads in intra PCM decoding.
FATE: do not decode audio in the nuv test.
dxa: set audio stream time base using the sample rate
psx-str: do not allow seeking by bytes
asfdec: Do not set AVCodecContext.frame_size
vqf: set packet parameters after av_new_packet()
mpegaudiodec: use DSPUtil.butterflies_float().
FATE: add mp3 test for sample that exhibited false overreads
fate: add cdxl test for bit line plane arrangement
vmnc: return error on decode_init() failure.
libvorbis: add/update error messages
libvorbis: use AVFifoBuffer for output packet buffer
libvorbis: remove unneeded e_o_s check
libvorbis: check return values for functions that can return errors
libvorbis: use float input instead of s16
libvorbis: do not flush libvorbis analysis if dsp state was not initialized
libvorbis: use VBR by default, with default quality of 3
libvorbis: fix use of minrate/maxrate AVOptions
...
Conflicts:
Changelog
doc/APIchanges
libavcodec/avcodec.h
libavcodec/dpxenc.c
libavcodec/libvorbis.c
libavcodec/vmnc.c
libavformat/asfdec.c
libavformat/id3v2enc.c
libavformat/internal.h
libavformat/mp3enc.c
libavformat/utils.c
libavformat/version.h
libswscale/utils.c
tests/fate/video.mak
tests/ref/fate/nuv
tests/ref/fate/prores-alpha
tests/ref/lavf/ffm
tests/ref/vsynth1/prores
tests/ref/vsynth2/prores
Merged-by: Michael Niedermayer <michaelni@gmx.at>