Commit Graph

41106 Commits

Author SHA1 Message Date
Martin Storsjö c725faebda movenc: Use start_dts/cts instead of cluster[0] for writing edit lists
This allows writing edit lists even when track->entry == 0, if
the start times have been set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-03 01:18:52 +02:00
Martin Storsjö 724cbea719 movenc: Remove an unnecessary condition when flushing fragments
If fragments == 0 it means we haven't written any moov atom yet.
If the empty_moov flag is set, we already have written an empty moov
atom at startup. Thus, the check for empty_moov is redundant.

This is in preparation for allowing writing the moov atom later,
even when using the empty moov flag.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-03 01:18:38 +02:00
Martin Storsjö 355d01a1bf movenc: Factorize writing ftyp and other identification tags to a separate function
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-03 01:18:28 +02:00
Martin Storsjö 8d54bacb78 dashenc: Remove some stray double spaces
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-29 23:26:43 +02:00
Martin Storsjö b91a5757fc dashenc: Fix writing of timelines that don't start at t=0
When writing an explicit time, reset the cur_time variable to this
value as well. This avoids writing excessive time attributes for each
segment in the timeline, as long as the segments are continuous.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-29 23:26:25 +02:00
Martin Storsjö 50036c30df fate: Use bitexact conversions in the dpxparser test
This fixes fate on e.g. ppc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-29 23:21:43 +02:00
Anton Khirnov 60d4c6ff76 h264: restore a block mistakenly removed in e10fd08a
CC: libav-stable@libav.org
Bug-ID: 781
2014-12-27 10:44:48 +01:00
Rémi Denis-Courmont 737d35e334 vdpau: add support for the H.264 High 4:4:4 Predictive profile
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont 1f9237f2ac avconv_vdpau: allocate video surface of VDPAU-specified size
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont ebd5320afd vdpau: add support for 4:2:2 and 4:4:4 chroma sampling
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont c220a60f92 vdpau: add helper for surface chroma type and size
Since the VDPAU pixel format does not distinguish between different
VDPAU video surface chroma types, we need another way to pass this
data to the application.

Originally VDPAU in libavcodec only supported decoding to 8-bits YUV
with 4:2:0 chroma sampling. Correspondingly, applications assumed that
libavcodec expected VDP_CHROMA_TYPE_420 video surfaces for output.
However some of the new HEVC profiles proposed for addition to VDPAU
would require different depth and/or sampling:
http://lists.freedesktop.org/archives/vdpau/2014-July/000167.html
...as would lossless AVC profiles:
http://lists.freedesktop.org/archives/vdpau/2014-November/000241.html

To preserve backward binary compatibility with existing applications,
a new av_vdpau_bind_context() flag is introduced in a further change.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont 6c99c92a42 libavcodec: add AV_HWACCEL_ALLOW_HIGH_DEPTH flag
This can be used by the application to signal its ability to cope with
video surface of types other than 8-bits YUV 4:2:0.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont 57b6704ecd avcodec: add AVCodecContext.sw_pix_fmt
This carries the pixel format that would be used if it were not for
hardware acceleration. This is equal to AVCodecContext.pix_fmt if
hardware acceleration is not in use.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:49 +01:00
Rémi Denis-Courmont 4cfbeef31d h264: factor hwaccel pixel formats list
This is to avoid proliferation of similar tables in following changes.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-25 20:47:48 +01:00
Kieran Kunhya 9cfa68c560 mpegts: add support for Opus
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 11:29:19 +01:00
Martin Storsjö 8ebf02f8f5 libavformat: Only use MoveFileExA when targeting the desktop API subset
The MoveFileExA is available in the headers regardless which API
subset is targeted, but it is missing in the Windows Phone link
libraries. When targeting Windows Store apps, the function is
available both in the headers and in the link libraries, and thus
there is no indication for the build system that this function
should be avoided - such an indication is only given by the
Windows App Certification Kit, which forbids using the MoveFileExA
function.

Therefore check the WINAPI_FAMILY defines instead, to figure out
which API subset is targeted.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-19 23:24:47 +02:00
Martin Storsjö fc308b30bb rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output buffer exists
Since the mpegts muxer now can handle being called with a NULL
AVIOContext, we don't need to try to allocate one before calling
write_trailer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-19 23:14:45 +02:00
Martin Storsjö e2ce163922 mpegts: Support running the write_trailer function without an AVIOContext
If opening and closing dynamic buffers as AVIOContext, we may
not have any AVIOContext available when wanting to close and
deallocate the muxer. Allow calling write_trailer despite this.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-19 23:13:04 +02:00
Martin Storsjö 4895aa65c6 libavformat: Allow calling av_write_trailer with a NULL AVIOContext
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-19 23:12:58 +02:00
Michael Niedermayer cee4490b52 on2avc: check number of channels
Fixes invalid memory access.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8549
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-19 08:01:47 +01:00
Michael Niedermayer d423dd72be smc: fix the bounds check
Fixes invalid writes when there are more blocks in a run than total
remaining blocks.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8548
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-19 08:01:47 +01:00
Michael Niedermayer 0b39ac6f54 gifdec: refactor interleave end handling
Fixes invalid writes with very small image heights.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8547
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-19 08:01:47 +01:00
Anton Khirnov 17ba719d9b mmvideo: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 2.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8543
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-12-19 08:01:46 +01:00
Anton Khirnov 88626e5af8 jvdec: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 8.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8542
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-12-19 08:01:46 +01:00
Anton Khirnov 809c3023b6 mjpegdec: check for pixel format changes
Fixes possible invalid memory access.

Based on code by Michael Niedermayer <michaelni@gmx.at>

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8541
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-12-19 08:01:46 +01:00
Anton Khirnov 64f7575fbd mov: avoid a memleak when multiple stss boxes are present
CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-12-19 08:01:46 +01:00
Vittorio Giovara 210461c0a8 imgconvert: check memory allocations and propagate errors 2014-12-18 23:27:14 +01:00
Vittorio Giovara 596b5c488f wma: check memory allocations and propagate errors 2014-12-18 23:27:14 +01:00
Vittorio Giovara 63be97ec40 lavfi: always check av_expr_parse_and_eval() return value
CC: libav-stable@libav.org
Bug-Id: CID 703624
2014-12-18 23:27:14 +01:00
Vittorio Giovara 9e06327ecb xcbgrab: Move NULL check before pointer dereference
Bug-Id: CID 1254668
2014-12-18 23:27:14 +01:00
Vittorio Giovara 5ac06633cb takdec: check av_samples_get_buffer_size() return value
CC: libav-stable@libav.org
Bug-Id: CID 747734
2014-12-18 23:27:14 +01:00
Vittorio Giovara 16c7a8a142 aacps: invert the order of parameters of ipdopd_reset()
This is the order that the caller uses in the rest of the file. The
same operation is applied to both parameters, so this change is only
done for consistency, it doesn't change the actual behaviour.

Bug-Id: CID 732285 / CID 732286
2014-12-18 23:27:14 +01:00
Vittorio Giovara 76ccf114a6 rtsp: check ffurl_get_file_handle() return value
CC: libav-stable@libav.org
Bug-Id: CID 717844
2014-12-18 23:27:14 +01:00
Vittorio Giovara b1306823d0 check memory errors from av_strdup() 2014-12-18 23:27:14 +01:00
Vittorio Giovara 9745f19ffc assdec: check the right variable
CC: libav-stable@libav.org
Bug-Id: CID 1257815
2014-12-18 23:27:14 +01:00
Vittorio Giovara 971099ff5a aacenc: correctly check returned value
CC: libav-stable@libav.org
2014-12-18 23:27:14 +01:00
Vittorio Giovara ac467d94fa lcl: return an appropriate error code 2014-12-18 23:27:14 +01:00
Vittorio Giovara 8b263331c5 mpegts: check get16() return value
And break flow of execution rather than exiting the function.

CC: libav-stable@libav.org
Bug-Id: CID 732186
2014-12-18 23:27:13 +01:00
James Almer 430a816859 oggdec: add support for VP8 demuxing
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-18 23:27:07 +01:00
Vittorio Giovara 38129c26c5 cmdutils: check file access functions return values
CC: libav-stable@libav.org
Bug-Id: CID 703706
2014-12-18 23:23:00 +01:00
Vittorio Giovara c63dd3f0a4 a64multi: check elbg return values 2014-12-18 23:22:59 +01:00
Vittorio Giovara 3beb9cbad3 roqvideo: check memory allocations and propagate errors 2014-12-18 23:22:59 +01:00
Vittorio Giovara ae2d41ec87 elbg: check memory allocations and propagate errors 2014-12-18 23:22:59 +01:00
Luca Barbato 5d839778b9 lavu: Refactor side data wiping
And make sure the nb_side_data field is reset as well.

Based on an initial patch from wm4 <nfxjfg@googlemail.com>.

CC: libav-stable@libav.org
2014-12-18 23:22:59 +01:00
Vittorio Giovara effa7d2a6a fate: add test for offset theora 2014-12-18 23:22:59 +01:00
Vittorio Giovara 67fc8a15e4 theora: support different visible and coded frame size
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-18 23:22:59 +01:00
Vittorio Giovara a381e0cec8 fate: add a DPX parser test 2014-12-18 23:22:59 +01:00
Paul B Mahol 87bd298abe DPX parser
Additional improvements and fixes by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-12-18 23:22:59 +01:00
Carl Eugen Hoyos 3a3790b8f8 tiff: support encoding and decoding 64bit images 2014-12-18 23:22:59 +01:00
Martin Storsjö 59f0275dd0 movenc: Adjust the pts of new fragments similarly to what is done for dts
The pts and the corresponding duration is written in sidx
atoms, thus make sure these match up correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-12-18 23:14:27 +02:00