Commit Graph

14484 Commits

Author SHA1 Message Date
Tomas Härdin 8b708f1c6b mxf: Correctly support files from Pinnacle Thunder
Such files have IndexTableSegments which when parsed cover EditUnit
ranges like this:

 [0,1)
 [249,250)
 [249,377)
 [0,249)

where each interval is

 [IndexStartPosition, IndexStartPosition + IndexDuration)

This would be reduced to a sparse index like:

 [0,1), [249,250)

instead of the full range:

 [0,249), [249,377)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-14 18:13:29 +01:00
Luca Barbato f5fbbbc022 mxf: Drop unnecessary checks
av_reallocp_array does the check already.
2014-01-14 18:13:29 +01:00
Michael Niedermayer 0d6605c7ef mxf: Fix a possible leak of extradata
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-14 18:13:29 +01:00
Marton Balint aa0cb16c15 mxf: Fix off by one error in d10 aes3 decoding
Without this fix the last sample was missing from the packet.
2014-01-14 18:13:22 +01:00
Luca Barbato 42f9132218 mxf: Do not use int to check the seek position
Overly large files are to be expected.

Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
2014-01-14 17:29:03 +01:00
Reimar Döffinger d84bd4650b mxf: Set AV_FIELD_PROGRESSIVE
Needed for AVC-intra

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-14 17:28:48 +01:00
Andrey Myznikov b79bccba80 avformat/librtmp: Fix memory leak if RTMP_ConnectStream() fails
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-14 01:59:23 +01:00
Michael Niedermayer 05c78f345b avformat/utils: av_probe_input_buffer2 decrease difference to libav
This removes the initialization of 2 unused fields
The change was part of c1868e7ee7
but wasnt merged as the fields could still be used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-14 01:59:11 +01:00
Michael Niedermayer 05886c9d4e avformat/utils/av_probe_input_buffer2: fix buffer passed to ffio_rewind_with_probe_data()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-13 22:24:30 +01:00
Michael Niedermayer 8c3b026a0e avformat/utils/av_probe_input_buffer2: fix offset check
The check could fail if avio_read() read less than requested

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-13 22:23:40 +01:00
Michael Niedermayer 6a2064820b avformat/utils/av_probe_input_buffer2: Fix pd.buf_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-13 22:14:02 +01:00
Michael Niedermayer 220f0927b8 Merge commit '8b76362836f3c373c3aadc544522edcbef16dd5f'
* commit '8b76362836f3c373c3aadc544522edcbef16dd5f':
  lavf: use a fixed width type

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-13 21:34:42 +01:00
Anton Khirnov 2115a35974 lavf: make av_probe_input_buffer more robust
Always use the actually read size as the offset instead of making
possibly invalid assumptions.

Addresses: CVE-2012-6618
2014-01-13 15:00:09 +01:00
Anton Khirnov 8b76362836 lavf: use a fixed width type
It's shorter and more consistent with the rest of the code.
2014-01-13 15:00:09 +01:00
Anton Khirnov c1868e7ee7 lavf: simplify handling of offset in av_probe_input_buuffer() 2014-01-13 15:00:09 +01:00
Serhii Marchuk c917cde9cc mpegts muxer, DVB subtitles encoder: common DVB subtitles payload
Improved DVB subtitles encoder to generate AVPacket.data in the same
format as generates MPEGTS demuxer + DVB subtitles parser. So now single
format of DVB subtitles data is used across all the components of FFmpeg:
only subtitles payload WITHOUT 0x20 0x00 bytes at the beginning and 0xFF
trailing byte.

Improved MPEGTS muxer to support format of DVB subtitles in
AVPacket.data described above: while muxing we add two bytes 0x20 0x00 to
the beginning of and 0xFF to the end of DVB subtitles payload.

The patch fixes DVB subtitle copy problems: tickets #2989 fully and #2024
partly.

Signed-off-by: Clément Bœsch <u@pkh.me>
2014-01-12 16:40:52 +01:00
Michael Niedermayer 419787a2ff Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flv: Workaround for buggy Omnia A/XE encoder

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-11 20:56:29 +01:00
Benjamin Larsson 547f834537 flv: Workaround for buggy Omnia A/XE encoder
The Omnia A/XE encoder writes the explicit extra data incorrectly
and wrongly disables parametric stereo. Truncating the extra data
by setting the size to 2 works around this. The AAC extra data
parser will then only parse the correct parts.

Bug-id: 599
2014-01-11 13:14:20 +01:00
Clément Bœsch b84a7330af avformat/pjsdec: dont increase pointer when its already at the end in read_ts()
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f91f2de7764_2649_PJS_capability_tester.pjs
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-11 02:28:17 +01:00
Michael Niedermayer a1ed1c2193 avformat/matroskadec: check generic audio deinterleaver sub_packet_size against frame_size
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f67d052a530_7517_nosound.mkv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 23:45:43 +01:00
Michael Niedermayer 396ddcf22d avformat/flvdec: initialize context before reading from it
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9b8387069e_5377_flv_with_pcm_s16be_audio_track.flv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 20:59:25 +01:00
Michael Niedermayer e2bb185e62 nut: Support XYZ12 rawvideo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 17:51:13 +01:00
Michael Niedermayer 4cb9c20136 avformat/avisynth simplify packet allocation
Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 15:38:59 +01:00
Michael Niedermayer 3b8299c1e1 Merge commit 'aa69cbc9e08281db6ecb98a2c8b4f60e8b12e558'
* commit 'aa69cbc9e08281db6ecb98a2c8b4f60e8b12e558':
  flac muxer: add option to disable writing the global header

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 02:32:12 +01:00
Michael Niedermayer 4162ceea93 avformat/mxfdec: check avio_read(UID) result
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fc9ba2fd98e_82_02785736.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 02:12:30 +01:00
Michael Niedermayer 7f9697aa11 avformat/nutdec: fix packet end clearing
The code was buggy, using the wrong variable, also it missed the case
where the packet become smaller due to sidedata/metadata being extracted
which left a few bytes uninitialized

Fixes use of uninitialized memory
Fixed: msan_uninit-mem_7f6abbe44530_6838_mewmew_vorbis_ssa.nut
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-10 00:34:15 +01:00
Michael Niedermayer 77d2a1ca59 avformat/rmdec: when reading audio blocks, dont leave holes when reading fails
The fate test is changed because the reference file depends on the use of
non cleared data at the very
end. Alternatively we could upload a new reference file, though that would
then have to be changed every time the handling of a truncated frame changes
or theres a change to error concealment, each time adding a new file ...

Fixes use of uninitialized memory
Fixed: msan_uninit-mem_7f3c02b81363_2787_RLG2_19.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 23:50:59 +01:00
Justin Ruggles aa69cbc9e0 flac muxer: add option to disable writing the global header
The global header is not explicitly required for playback, and
omitting it allows for simple concatenation.
2014-01-09 16:09:41 -05:00
Maxim Polijakowski e6f0bb6527 ATRAC3+ decoder
Cleanup by Diego Biurrun.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-01-09 19:33:07 +01:00
rogerdpack 2be1e1b223 avformat/udp: debug log udp socket size
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 23:56:05 +01:00
Stephen Hutchinson 16ae337bd8 avisynth: Use av_packet_from_data instead of av_new_packet
If the audio changes from 9eac7c4 were merged as they were, this
would cause scripts with both video+audio to fail with a lot of
audio decoding errors (the video would be fine). Scripts with
only one of either video or audio were unaffected. Additionally,
the av_packet changes in general caused seeking to break.

Using av_packet_from_data allows video+audio scripts to work as
expected, without audio decoding errors.  It also fixes seeking.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 12:54:27 +01:00
Anton Khirnov 02dd178d9d avisynth: More av_new_packet changes
These are the remaining av_packet-related bits from 9eac7c4
that didn't get merged at that time.

Changes authored by Anton Khirnov <anton@khirnov.net>, split out
from 9eac7c4 by Stephen Hutchinson <qyot27@gmail.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 12:54:22 +01:00
Michael Niedermayer 1c010fd035 avformat/mxfdec: detect loops during header parsing
The header parser uses forward and backward parsing, making the
bulletproof prevention of loops difficult, thus this simple
detection code.
If someone improves the forward/backward parsing so it cannot loop
then this commit should be reverted

Fixes Ticket3278

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-08 04:55:42 +01:00
Carl Eugen Hoyos 94cf4f8bac Use the h264 parser when decoding VSSH in avi.
Fixes ticket #3261 visually.

Analyzed-by: Michael Doilnitsyn
2014-01-07 22:49:05 +01:00
Michael Niedermayer 243b9fea90 avformat/takdec: zero padding area before use
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fcecee73d71_6470_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 19:48:13 +01:00
Michael Niedermayer 2303b45112 avformat/segafilm: drop song and dance, this seems not to do anything anymore since a long time
Fixes use of uninitialized memory
Partly fixes; msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 15:02:31 +01:00
Michael Niedermayer 77274d5c79 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  network.h: Add #endif comments to improve readability

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 13:16:55 +01:00
Michael Niedermayer b0517467c0 avformat/webvttdec: Dont skip over a never checked byte after -->
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f49667d83db_3396_WebVTT_capability_tester.vtt
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 04:09:19 +01:00
Michael Niedermayer ed1eb9602c avformat/rmdec: check that sub_packet_size fit in the packet for DEINT_ID_GENR
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa8c49400d0_3923_audiosig.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 00:26:33 +01:00
Michael Niedermayer 71fe97a60a avformat/nutdec: check avio_read() return code
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f2785ab8669_6838_mewmew_vorbis_ssa.nut
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-07 00:26:33 +01:00
Diego Biurrun 9997cee04d network.h: Add #endif comments to improve readability 2014-01-06 21:16:54 +01:00
Michael Niedermayer 2a58d5fc0e Merge commit '6892d145a0c80249bd61ee7dd31ec851c5076bcd'
* commit '6892d145a0c80249bd61ee7dd31ec851c5076bcd':
  segafilm: fix leaks if reading the header fails

Conflicts:
	libavformat/segafilm.c

See: ca5456db7f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 17:13:09 +01:00
Michael Niedermayer 76c63bc5d8 Merge commit '3867f3718ba82ff11d3e24c6d84beb520d0b174f'
* commit '3867f3718ba82ff11d3e24c6d84beb520d0b174f':
  lavf: remove a pointless check

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 15:34:45 +01:00
Michael Niedermayer 59725592a9 Merge commit '75647dea6f7db79b409bad66a119f5c73da730f3'
* commit '75647dea6f7db79b409bad66a119f5c73da730f3':
  oggparseogm: check timing variables

See: 9ed388f598
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-06 15:28:24 +01:00
Anton Khirnov 6892d145a0 segafilm: fix leaks if reading the header fails
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:26:09 +01:00
Anton Khirnov 3867f3718b lavf: remove a pointless check
AVStream.codec is always non-NULL
2014-01-06 08:21:53 +01:00
Anton Khirnov 75647dea6f oggparseogm: check timing variables
Fixes a potential divide by zero.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:21:38 +01:00
Michael Niedermayer d04aceb7d0 avformat/nutdec: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 17:27:23 +01:00
Peter Ross f5f6e59495 avformat/matroskaenc: warn when muxing video codec not supported by format
This occurs for video codecs that have codec_tag set, but are are not listed
in ff_codec_bmp_tags (e.g. AV_CODEC_ID_BINKAUDIO, AV_CODEC_ID_IFF_ILBM).

Fixes ticket #3269.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 04:33:24 +01:00
Michael Niedermayer 70937d9708 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  sdp: Check that fmt->oformat is non-null before accessing it

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 02:38:57 +01:00
Michael Niedermayer 7546ac2fee avformat/mp3dec: fix start time in light of initial skip samples
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 01:05:16 +01:00
Stefano Sabatini 22fa50d159 lavf/file: fix help message first character casing for trunc option 2014-01-05 00:51:38 +01:00
Martin Storsjö 82b9799bb2 sdp: Check that fmt->oformat is non-null before accessing it
This avoids crashes when avserver tries to create an SDP, since
d77f4af.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-05 01:33:46 +02:00
Alexander Strasser 77015443a8 lavf/file: file_check: Handle file URLs that start with "file:"
Handle the URL analog to file_open, it may contain a "file:"
prefix. Skip it. Make access checks to file URLs starting
with "file:" work.

Fix part of ticket #3249.

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2014-01-04 23:19:37 +01:00
Mark Harris 262451878b avformat/oggparseopus: fix segmented timestamps
Fix timestamp calculation for code 3 Ogg Opus packets with less than
2 bytes in the last segment (e.g. packet length 255 or 256).
A sample that would seek incorrectly in ffplay can be created with:
  ffmpeg -i in.wav -b:a 34k -vbr off -frame_duration 60 out.opus
and libopus 1.1

Also do not read past the end of the buffer when a packet has length 0.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 22:39:07 +01:00
Michael Niedermayer 5e0c7eab2a avformat/oggdec: dont read timestamps from EOS pages of ogm videos
Some muxers store invalid timestamps there, which breaks seeking
Fixes Ticket2739

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 18:39:42 +01:00
Michael Niedermayer 863f4c3c71 avformat/utils: fix rounding error accumulation for generated dts in compute_pkt_fields()
This only updates the case where there is no B frame reordering delay.

Tested-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 15:10:44 +01:00
Michael Niedermayer 8113e838a8 avformat/nut: add support for per frame side & meta data with version 4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 14:13:31 +01:00
Michael Niedermayer 4a055f91be Merge commit '1b5d065ca722eb8028c7a08e054b6da3419faf5d'
* commit '1b5d065ca722eb8028c7a08e054b6da3419faf5d':
  pmpdec: check that there is at least one audio packet.

Conflicts:
	libavformat/pmpdec.c

See: 8b1cd25ca7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-04 01:36:06 +01:00
Michael Niedermayer 5047849584 avformat/utils: fix order of buffers in timestamp update code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-03 23:27:28 +01:00
Anton Khirnov 1b5d065ca7 pmpdec: check that there is at least one audio packet.
The code cannot handle there being none, but that should not happen for
valid files.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:40:22 +01:00
Peter Ross 57cfcbf347 avformat/bink: display audio track ids
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-03 14:11:07 +01:00
Anssi Hannula 9371d70bad avformat/hls: decouple playlists from variants
Not all "sub-playlists" are variant playlists (containing the same
content with a different bitrate, etc) in the current version of the HLS
specification. They can now also be alternative renditions, containing
e.g. alternative audio tracks etc.

Decouple playlists from variants to prepare for handling the new
features.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-01-03 15:05:48 +02:00
Anssi Hannula 857841c1b6 avformat/http: always allow no-op seek
This also allows checking stream position as per ffurl_seek() doxy.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2014-01-03 15:05:48 +02:00
Peter Ross 0588acaffa avformat/bink: seek to first frame
Some rare bink files include unused bytes between the frame table index
and first frame data.

Fixes ticket #3266.

This patch has also been tested with non-seekable protocols.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-03 13:50:11 +01:00
James Almer 2c759d7018 matroskadec: Export the MuxingApp element value as metadata
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-03 04:09:00 +01:00
Peter Ross 7340718d1c avformat/bink: recognize bink2 files
Support demuxing of audio streams in bink2 files.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-02 12:15:07 +01:00
Michael Niedermayer e9a26dc5bf avformat/mux: fix "no tag found" check in validate_codec_tag()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 22:30:31 +01:00
Michael Niedermayer 06bb1de1c7 avformat/vqf: check avio_read()s return value more completely
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f180a523a71_5052_esvorbei_extd.vqf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-01 16:53:54 +01:00
Stefano Sabatini 8c8c3ca91e doc/protocols/rtsp, lavf/rtsp: fix/extend options documentation 2014-01-01 12:57:15 +01:00
Michael Niedermayer 97fca5492a avformat/version: bump micro for addition of internal field to AVStream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-31 14:16:27 +01:00
Michael Niedermayer 4bfcedb33f avformat: dont run update_initial_duration() twice
This should avoid floods of first_dts not matching debug messages

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-31 14:13:51 +01:00
Anssi Hannula 7fdf245ab9 avformat/id3v2: allow ID3 parsing without AVFormatContext
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>
2013-12-31 05:15:19 +02:00
Anssi Hannula d52882faef avformat/http: allow the caller to select a request range
Add AVOptions for setting the initial offset and the ending offset, so
they can be used for setting an appropriate Range header.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2013-12-31 03:18:53 +02:00
Anssi Hannula 53765ae33b avformat/id3v2: parse ID3 Private frames as extra metadata
They are used in HLS.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2013-12-31 03:18:53 +02:00
Anssi Hannula 4a4437c0fb avformat/mpegts: demux timed ID3 metadata
Used in some HLS streams ("Timed Metadata for HTTP Live Streaming").

This is just ID3 tags at arbitrary stream positions, but I still added
"timed" to the codec name to avoid confusion with regular non-stream ID3
tags.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2013-12-31 03:13:12 +02:00
James Almer d890db5f53 oggdec: add support for VP8 demuxing
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-30 04:05:27 +01:00
Michael Niedermayer 12fc0c89dc Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master:
  lavf/libssh: improve authentication
  lavf/libssh: fix file mode

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 21:11:03 +01:00
Lukasz Marek 8ba77dfbc2 lavf/libssh: improve authentication
- Add authentication using keys
- Provide better message on fail

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-12-29 16:24:07 +01:00
Lukasz Marek 247a8fa70f lavf/libssh: fix file mode
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2013-12-29 16:24:07 +01:00
Michael Niedermayer 1acd029f40 avformat/wc3movie: Check strings before printing.
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f7812ca062f_2812_SC_32_part.MVE
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 14:06:47 +01:00
Michael Niedermayer 8a0d446ad6 avformat/siff: check avio_read() return value before returning packet
Fixes: /ld/michael/ffmpeg_uninit/ffmpeg_uninit/done/msan_uninit-mem_7fb3e0fa86e9_1980_INTRO_B.VB
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 13:25:13 +01:00
Maxim Poliakovski 54bb30bae2 omadec: Disable "Unsupported codec ATRAC3+" warning
Also add a list of supported decoders.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 01:11:21 +01:00
Michael Niedermayer 8e90c7285d avformat/iff: check avio_read() return in get_metadata()
Fixes: msan_uninit-mem_7f9539ba8461_4760_dasboot_in_compressed
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-29 00:58:13 +01:00
Michael Niedermayer 8efde6d80c avformat/mov: clear padding area in mov_read_extradata()
Fixes: msan_uninit-mem_7f58816b71e3_7025_mov_svq3___svq3_weird_prediction2.mov
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-28 03:42:40 +01:00
Michael Niedermayer 4156df59f5 avformat/mov: check avio_read() return in mov_read_dref()
Fixes: msan_uninit-mem_7f4960453a02_7264_mr_cork_jpeg.mov
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 23:37:17 +01:00
Michael Niedermayer 25b243759c Merge commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0'
* commit 'b83d1ee3b41cfe8357836e2582104db2f3364cb0':
  avutil: Move library version related macros to version.h

Conflicts:
	libavcodec/version.h
	libavresample/version.h
	libavutil/avutil.h
	libavutil/utils.c

See: 183117fed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 12:01:23 +01:00
Michael Niedermayer e630ca5111 avformat/mpegts: check sl.timestamp_len
Fixes: msan_uninit-mem_7ff4404547ba_4883_dmbts.ts
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-27 11:53:53 +01:00
Diego Biurrun b83d1ee3b4 avutil: Move library version related macros to version.h
This is a more sensible place for these macros.
2013-12-26 19:05:22 +01:00
Michael Niedermayer 0875a9e4fc avformat/oggparseogm: check input size before reading t
Makes no difference in outcome, as the checks on t have no effect
when t was uninitialized

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa2b7b5d97c_3598_anOTHERS_DixX_in_Ogg_Sample.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 16:56:10 +01:00
Michael Niedermayer 6359872877 avformat/oggparseogm: check input size before reading parameters
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f4d0daad100_3599_anOTHERS_DixX_in_Ogg_Sample.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 16:19:01 +01:00
Michael Niedermayer 6b36f577a1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mms: Remove non-utf8 characters

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 13:24:43 +01:00
Luca Barbato 1716b4c7b8 mms: Remove non-utf8 characters
Certain softwares get badly confused.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-12-26 06:07:35 +01:00
Michael Niedermayer 165f96cd2d avformat/rmdec: move packet allocation down
Fixes memleak
Fixes: msan_uninit-mem_7fc5d73327d4_6192_kuerti.ra
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 04:16:10 +01:00
Michael Niedermayer 4e394a98f2 avformat/rmdec: check against mismatching int4 interleaver parameters which would leave uninitialized holes
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9cf38857c0_4582_coop.ra
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 04:02:40 +01:00
Michael Niedermayer 26ce266e3d avformat/mpc8: check avio_read() return in mpc8_parse_seektable()
no sample / testcase known

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-26 00:11:49 +01:00
Michael Niedermayer e33b6ccfa7 avformat/mpc8: clear buffer padding area
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa6a48cd1d5_8853_sv8_notags.mpc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 23:54:27 +01:00
Stefano Sabatini 1b4da43ce0 doc/protocols/tcp,lavf/tcp: apply minor fixes to TCP protocol documentation 2013-12-25 18:42:26 +01:00
Stefano Sabatini 702d9a23b3 lavf/tcp: honor listen option value in a tag
Consistent with what is done in udp.c, allow to explicitly disable listen
with listen=0.
2013-12-25 18:42:20 +01:00
Stefano Sabatini b80cf46090 doc/protocols/udp,lavf/udp: apply minor documentation fixes 2013-12-25 18:42:15 +01:00
Michael Niedermayer 239a0543a6 avformat/westwood_vqa: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:30 +01:00
Michael Niedermayer 6fb29535fd avformat/vc1test: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:30 +01:00
Michael Niedermayer 2e2cab6e4f avformat/rsd: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:30 +01:00
Michael Niedermayer fd335aa326 avformat/rmdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer 61883a2e89 avformat/rl2: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer 0b9ca70243 avformat/riffdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer bb6101d4de avformat/nuv: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer 0cedc6c066 avformat/nutdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer 6f7daae043 avformat/mpc8: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer a1ce41c9a4 avformat/mpc: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer 3e5a7dffe8 avformat/mov: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer 28cc7062c8 avformat/isom: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer 215759a925 avformat/idcin: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:38:29 +01:00
Michael Niedermayer d8d5258bb7 avformat/flvdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:24:09 +01:00
Michael Niedermayer c633aeba45 avformat/ffmdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:55 +01:00
Michael Niedermayer 773f2a563f avformat/cafdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:39 +01:00
Michael Niedermayer 5ce04c54dd avformat/bink: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:25 +01:00
Michael Niedermayer e93bc3efbf avformat/avidec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:23:13 +01:00
Michael Niedermayer f04fc386dc avformat/apetag: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:22:49 +01:00
Michael Niedermayer 9e5fa1e55d avformat/apc: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer b59740eae5 avformat/aiffdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer 482b2042cd avformat/adxdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer ee4e805093 avformat: add ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 17:14:32 +01:00
Michael Niedermayer ac480cb58d avformat/isom: free extradata on failure to read it
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f607d80f661_6965_mov00003.mqv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 16:25:17 +01:00
Michael Niedermayer 2a5fb0b13e avformat/mov: check avio_read return in mov_read_dvc1()
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f46d5199ee1_9456_vc1-wmapro.ism
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 14:55:28 +01:00
James Almer 0d944ee343 matroskadec: Fix bug when parsing realaudio codec parameters
flavor can be 0.

This fixes tract ticket #3214

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 13:36:25 +01:00
Michael Niedermayer 459db51271 avformat/ape: free packet on avio_read() failure
Fixes memleak
Fixes: msan_uninit-mem_7fcc198b365b_8417_sh3.ape
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:32:40 +01:00
Michael Niedermayer 804ea14b35 avformat/nut: add minor_version field with version>=4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:19 +01:00
Michael Niedermayer 6aa50374bf avformat/nut: store version in the context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:03:08 +01:00
Michael Niedermayer 3cfa310c5d avformat/ape: zero seektable&bittable and warn when they where only partially filled
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fcc198b365b_8417_sh3.ape
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-25 02:01:46 +01:00
Carl Eugen Hoyos 691dec6201 Allow stream-copying grayscale mov files.
This reverts 0de2157f / r12272.
Fixes ticket #3215.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-24 22:22:16 +01:00
Carl Eugen Hoyos d63e994361 avformat/mov: Do not compute a grayscale palette for cinepak in mov.
This was never done for avi files, the decoder always produced
output no matter if a palette was computed or not.
Since a non-standard palette was needed, this simplifies the code.
See issue 1067 and ticket #165.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-24 22:22:06 +01:00
Alex Sukhanov 251c96a70b avformat/matroskadec: Fix start_time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-24 18:59:46 +01:00
Carl Eugen Hoyos 05c3c568dc Read pictures in id3v2.2 2013-12-23 23:41:37 +01:00
Peter Ross e93a73cbef wtvenc: output ff_format_none if ff_put_wav_header fails
This occurs when muxing E-AC-3.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 19:51:32 +01:00
Peter Ross e4be076570 wtvenc: use codec tag + MEDIASUBTYPE_BASE_GUID, if there is no suitable guid
This permits H264, AAC, AAC-LATM muxing.

Fixes ticket #536.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 19:51:17 +01:00
Peter Ross 686b6dc33a wtv: make ff_format_videoinfo2 visible to wtv encoder
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 19:43:09 +01:00
Michael Niedermayer 5c3079aaa9 avformat/iss: check sscanf() return code
Fixes use of uninitialized data
Fixes: msan_uninit-mem_7f883205ce82_15_0001010100.iss
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 16:28:44 +01:00
Peter Ross 6da21c1f81 wtvenc: populate VIDEOINFOHEADER2
Fixes ticket #2835.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 15:55:54 +01:00
Peter Ross f93b0abe40 avformat/riffenc: indent
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 15:55:47 +01:00
Peter Ross fcbb94712d riffenc: add option to ff_put_bmp_header to ignore extradata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 15:42:35 +01:00
Peter Ross d08ea75a82 wtvenc: test avio_size() validity
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-23 13:33:45 +01:00
Michael Niedermayer de2a2caf4d nutenc/write_index: warn if 2 consecutive keyframes have the same PTS and discard the 2nd
This fixes an assertion failure and regression and restores previous behaviour
Fixes Ticket3197

An alternative would be to fail hard in this case and refuse to mux such data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 19:00:28 +01:00
Michael Niedermayer 6fe5f770db Merge commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b'
* commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b':
  Add a libwebp encoder

Conflicts:
	Changelog
	doc/encoders.texi
	doc/general.texi
	libavcodec/version.h
	libavformat/img2enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 11:53:41 +01:00
Michael Niedermayer 9b195dd579 avformat/4xm: shrink packet if it was only partially initialized
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f6c76ab7950_4920_dracula.4xm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 01:48:33 +01:00
Michael Niedermayer 2c635fabbf avformat/isom: check avio_read() result
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f7aa4151661_4885_dmbts3.ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 01:48:33 +01:00
Michael Niedermayer b797a00f63 avformat/rmdec: zero string destination before use
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9677850d99_4635_crashed.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 23:27:09 +01:00
Justin Ruggles be7c323176 Add a libwebp encoder 2013-12-21 17:01:42 -05:00
Michael Niedermayer 55328d5f72 avformat/electronicarts: detect endianness by comparing sizes instead of using an arbitrary threshold
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 14:09:45 +01:00
Michael Niedermayer a07d4bc80a avformat/gxfenc: dont use a int intermediate to store in a unsigned int table
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 13:52:10 +01:00
Michael Niedermayer 587e3c3426 avformat/electronicarts: use 64bit variable for avio_tell() result
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 13:48:15 +01:00
Peter Ross 8baaa924bd wtvdec: when testing for truncated files, actually check the .wtv file size
Previously the demuxer was testing against avio_tell, and this would generate
many false warnings.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 11:45:14 +01:00
Michael Niedermayer 6fc9f5e0ff Merge commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30'
* commit 'f412b2c9f3a7add0ab8021262ec4bad249347e30':
  flv: Use the correct type to hold the file offset

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 00:14:11 +01:00
Michael Niedermayer 0c16f6449b Merge commit '15739a9bd19a7d47ad8afb25348c684a3bdd6ef2'
* commit '15739a9bd19a7d47ad8afb25348c684a3bdd6ef2':
  jvdec: Do not feed the decoder with known wrong data

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-21 00:06:13 +01:00
Michael Niedermayer b9f33ad320 Merge commit 'e518cb863edc931888ccca6cad86f73ca7430cef'
* commit 'e518cb863edc931888ccca6cad86f73ca7430cef':
  jvdec: Fix memory leak of jv->frames

See: 596814f978
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:59:05 +01:00
Michael Niedermayer d2344afb90 Merge commit '027712e851da4d124a842c9e2802f95d50582553'
* commit '027712e851da4d124a842c9e2802f95d50582553':
  jvdec: Return EOF on end of file

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:50:58 +01:00
Michael Niedermayer eedd914873 avformat/pva: Make sure the header is large enough before reading the timestamp from it
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f34b5dc6d58_2674_PVA_test-partial.pva
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:04:51 +01:00
Michael Niedermayer 5ec3c7b7c1 avformat/pva: Make sure the first byte of pes_header_data has been initialized
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f53c1d0e95c_2674_PVA_test-partial.pva
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 23:04:51 +01:00
Michael Niedermayer 632fdec9f4 avformat/nistspheredec: initialize header_size to -1
Fixes use of uninitialized memory
This also avoids the need to check the scanf() return as the subsequent check catches it
Fixes: msan_uninit-mem_7f712e4dc173_7414_nist_ulaw.nist
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 18:08:58 +01:00
Luca Barbato f412b2c9f3 flv: Use the correct type to hold the file offset 2013-12-20 17:44:20 +01:00
Luca Barbato 15739a9bd1 jvdec: Do not feed the decoder with known wrong data
Still assume the size value is right in non-explode mode.
2013-12-20 17:44:20 +01:00
Paul B Mahol e518cb863e jvdec: Fix memory leak of jv->frames
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-12-20 17:44:20 +01:00
Luca Barbato 027712e851 jvdec: Return EOF on end of file 2013-12-20 17:44:20 +01:00
Michael Niedermayer a165964f3c avformat/sierravmd: Check avio_read return value
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f82af392dae_1848_HR060606.VMD
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-20 01:03:19 +01:00
Michael Niedermayer 8fe06e7ae8 avformat/nistspheredec: check sscanf() success before using the result
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f935c3c6c1a_7413_nist_pcms8.nist
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 21:46:47 +01:00
Michael Niedermayer 5eeeb4abf9 rpl: Dont fill the index with entries that failed to be parsed
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fd10a199a3c_6204_landing.rpl
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 19:24:10 +01:00
Leandro Dorileo f9b997c337 libavformat/mpegts: expose raw packet size
We cannot easily determine if an mpeg TS's packet size is DVHS, FEC
or so on, for that we need to expose the internal raw_packet_size
field.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 19:06:32 +01:00
Michael Niedermayer ae09db1023 avformat/dxa: check avio_read() return
Fixes use of uninitialized memory
Fixes msan_uninit-mem_7fd4d4323ddd_2453_MUSOSP1.dxa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 18:36:49 +01:00
Michael Niedermayer f5d039840a avformat/swfdec: clear 4 bytes at the end of a packet if they are not initialized
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7f055dd0ab1b_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 05:07:22 +01:00
Michael Niedermayer e72f5abbc6 avformat/swfdec: check avio_read() return code
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7f055dd0ab1b_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 05:07:13 +01:00
Michael Niedermayer fde74d1b9d avformat/swfdec: check avio_read() return code
Fixes use of uninitialized memory
Fixes msan_uninit-mem_7f90d9cce964_9558_videopop_guitar_300k.swf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-19 01:49:07 +01:00
Michael Niedermayer 4e575adeff avformat/ipmovie: Check palette size in OPCODE_SET_PALETTE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:46:37 +01:00
Michael Niedermayer 947e40b9fe avformat/ipmovie: Check that OPCODE_SET_PALETTE size is large enough
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fec1f40656c_4819_descent3_level5_16bit_partial.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:44:52 +01:00
Michael Niedermayer 5f0d552c9b avformat/ipmovie: remove superflous ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:15:52 +01:00
Michael Niedermayer 8faabf3bd2 avformat/ipmovie: Check that the OPCODE_INIT_AUDIO_BUFFERS size is large enough
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f75b03c1f19_4820_descent3_level5_16bit_partial.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 23:15:18 +01:00
Michael Niedermayer d8b4ba3c5a avformat/isom: zero MPEG4AudioConfig to avoid leaving fields uninitialized
Fixes: use of uninitialized memory
Fixes: msan_uninit-mem_7f392c443e0d_1433_Crowd_Applause_01.caf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-18 19:40:08 +01:00
Stefano Sabatini aeccb522eb lavf/concatdec: fix crash in case a file in script cannot be opened 2013-12-18 15:14:58 +01:00
Stefano Sabatini 8937af7b6f lavf/segment: increase logging level for message with segment start information
Help debugging.
2013-12-18 15:14:58 +01:00
Stoian Ivanov 5fe415f0f4 UDP: join multicast group on the interface specified with &localaddr=
When joining multicast groups, ffmpeg was using INADDR_ANY as interface address
which leads to enabling the multicast group on the interface with "default gateway".
Often multicast traffic is received over dedicated interface, which scenario ffmpeg was
unable to handle. With this patch, ffmpeg will enable multicast group to the interfaces
configured with address specified in &localaddr= parameter of udp:// URL. To avoid
loacal_addr resolve at udp_close(...) the UDPContext structure was extended with
struct sockaddr_storage local_addr_storage member, which is populated in udp_open(..)
and passed to udp_join_multicast_group()  and udp_leave_multicast_group().

Signed-off-by: Stoian Ivanov <s.ivanov@teracomm.bg>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 01:14:28 +01:00
Michael Niedermayer 49f10c9cb1 avformat/format: av_register_output_format() and av_register_intput_format() that work in O(1) time
Reviewed-by: Stefano Sabatini
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 01:07:43 +01:00
Michael Niedermayer 4ecac81678 avformat/psxstr: zero packet to prevent uninitialized data to leak through to the decoder
Fixes: msan_uninit-mem_7f150abf2e84_4817_descent-partial.str
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-16 04:32:50 +01:00
Michael Niedermayer ffbcb1c6f0 avformat/id3v2: Check avio_read() return value in read_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 22:11:28 +01:00
Michael Niedermayer 460f8fca9c avformat/id3v2: factor free code to the end of read_chapter()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 21:43:19 +01:00
Joakim Plate 6eda91ad54 mpegts: stop analyzing when pmt for all programs have been found
This disables NOHEADER after finding PMT for all programs to
avoid find_stream_info always exhausting probe size for mpegts.

This is very important for live streams since read speed
will be limited. rtsp, udp and any protocol streaming a live
mpegts will have dramatically faster startup time.

Note, lack of codec parameters for streams can still cause
the full probe size to be exhausted.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 21:43:19 +01:00
Michael Niedermayer d600b18f22 avformat/utils: limit rfps to values larger than fps
This avoids some nonsense values being produced by totally corrupted input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 21:43:19 +01:00
Michael Niedermayer 476aceaa22 vformat/id3v2: check avio_read for short reads in addition to errors
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 20:13:45 +01:00
Stefano Sabatini d37d4b6e40 lavf/mux: improve feedback in case of no streams in muxer 2013-12-15 20:04:06 +01:00
Michael Niedermayer 4511531582 avformat/oggparsetheora: zero extradata padding area
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f66fa0ac09d_9197_theora_a4_v6_k250_s0.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 19:21:48 +01:00
Michael Niedermayer 0e0f6bd4a5 avformat/id3v2: Check avio_read() return code in id3v2_parse()
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>
2013-12-15 15:45:44 +01:00
Alex Sukhanov cc0e2ba1aa Enable parser in FLV demuxer for H264 codec
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 04:18:13 +01:00
Michael Niedermayer f6cd447bf1 avformat/utils: treat flv like mov with timestamp discarding
This prevents a regression when using an avparser with flv h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 04:18:13 +01:00
Michael Niedermayer 6f9be91063 avformat/iff: fix memleak of packet
Fixes: msan_uninit-mem_7f65b9788da6_388_24.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 01:44:04 +01:00
Michael Niedermayer 2b31a9c613 avformat/iff: shrink packets to the initialized data
Fixes use of uninitialized data
Fixes: msan_uninit-mem_7f65b9788da6_388_24.iff
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 01:34:14 +01:00
Michael Niedermayer 7a5d3a41fe avformat/mov: Check avio_read() return code in mov_read_extradata() and shrink the extradata if needed / return an error
Fixes use of uninitialized data
Fixes: msan_uninit-mem_7ff57193e77e_2715_RAW512K_Stream_004.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-15 00:16:53 +01:00
Michael Niedermayer 12e8104120 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_h264: Check the return value of functions doing allocations

See: c5f15f40b9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 22:39:57 +01:00
Michael Niedermayer 09c13ff7bd Merge commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4'
* commit '6451c8853a07ff2e28bda950fb5e83fcf88c5cf4':
  sdp: Check theora colorspace before producing the configuration string

See: db8a53d86a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 22:32:46 +01:00
Michael Niedermayer 6659364d3a Merge commit '797f2a791397210ec1b591b326658805c5dbf104'
* commit '797f2a791397210ec1b591b326658805c5dbf104':
  hdsenc: Check the init_file() return code
  hdsenc: Fix an off by one error in an array size check
  hdsenc: Avoid integer overflow

Conflicts:
	libavformat/hdsenc.c

See: 572965c9a6
See: 3dbf9afe85
See: 6722e564a8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 22:17:17 +01:00
Michael Niedermayer 892562e921 avformat/ipmovie: Check OPCODE_CREATE_TIMER size
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f81e836ef8c_5930_ipmovie_interplayvideo_interplay_dpcm__bislogo.mve
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 21:59:28 +01:00
Yu Xiaolei 20bc574b86 build fix: apetag.c depends on img2.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 18:51:17 +01:00
Michael Niedermayer 9aba0a6f7b rtpdec_h264: Check the return value of functions doing allocations
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-14 17:48:46 +02:00