This check is redundant with the previous commit but it provides
better error messages and feedback while the previous commit
ensures that var_read_string() doesnt return uninitialized arrays
if it itself is feeded with an invalid size possibly through a
different future codepath.
Fixes: asan_heap-oob_49b1e5_12_011.movie
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fixes out of array read
Fixes: asan_heap-oob_49b1e5_12_011.movie
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
should be the raw amount of pixels (for example 3840x1080 for full HD side by
side) and the DisplayWidth/Height in pixels should be the amount of pixels for
one plane (1920x1080 for that full HD stream)."
So, move the aspect ratio check in the mkv_write_stereo_mode() function
and always write the embl when stereo format and/or aspect ration is set.
Also add a few comments to that function.
CC: libav-stable@libav.org
Found-by: Asan Usipov <asan.usipov@gmail.com>
While a standalone implementation is nice, we already depend on
gmtime and gmtime_r in a number of places.
Signed-off-by: Martin Storsjö <martin@martin.st>
gmtime isn't thread safe in general. In msvcrt (which lacks gmtime_r),
the buffer used by gmtime is thread specific though.
One call to localtime is left in avconv_opt.c, where thread safety
shouldn't matter (instead of making avconv depend on the libavutil
internal header).
Signed-off-by: Martin Storsjö <martin@martin.st>
If the buffer provided to strftime is too small, the buffer contents
are indeterminate - it does not guarantee actually null terminating
the buffer.
Signed-off-by: Martin Storsjö <martin@martin.st>
None of these are likely unless the user is writing a file with two billion
streams or a duration of around two months.
CC: libav-stable@libav.org
Bug-Id: CID 700568 / CID 700569 / CID 700570 /
CID 700571 / CID 700572 / CID 700573
The new function wraps errno so that its value is correctly reported
when other functions overwrite it (eg. in case of logging).
CC: libav-stable@libav.org
Bug-Id: CID 1135748
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
This has also been independently found and fixed similarly by carl in
f4a3bbf4a3cd375121ea2495817f3e50e831ed48
The 2nd magic check is taken from carls implementation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The quality scale field is only supposed to be present if the fourth bit
is set. In practice, lame always sets it, but other tools might not.
CC:libav-stable@libav.org
The ones left using av_gettime are NTP timestamps (for RTCP,
which is specified to send the actual current realtime clock
in RTCP SR packets), and the NUT muxer timestamper, which is
documented as using wallclock time.
Signed-off-by: Martin Storsjö <martin@martin.st>
Previously, AVERROR(EIO) was returned. Now the value is passed from
lower level, thus it is possible to distinguish ECONNREFUSED, ETIMEDOUT,
ENETUNREACH etc.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Previously, AVERROR(EIO) was returned on failure of
http_open_cnx_internal(). Now the value is passed to upper level, thus
it is possible to distinguish ECONNREFUSED, ETIMEDOUT, ENETUNREACH etc.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>