Commit Graph

36082 Commits

Author SHA1 Message Date
Anton Khirnov 418693bdc5 lavc: rewrite and extend AVFrame doxy 2012-12-23 10:35:27 +01:00
Justin Ruggles d02202e08a opt: avoid segfault in av_opt_next() if the class does not have an option list
CC: libav-stable@libav.org
2012-12-22 15:43:27 -05:00
Justin Ruggles 5778299c7e ttadec: fix last frame handling when seeking
Using a frame count, as is done currently, does not work at all with
seeking. Instead, when the number of samples in the final frame has
been decoded, we check if only the 32-bit CRC is remaining. If so, we
assume that it is the final frame.

There is no longer a need to keep total_frames in TTAContext.
2012-12-22 14:45:35 -05:00
Justin Ruggles 68a04b0cce alacdec: do not be too strict about the extradata size
Sometimes the extradata has duplicate atoms, but that shouldn't prevent
decoding. Just ensure that it is at least 36 bytes as a sanity check.

CC: libav-stable@libav.org
2012-12-22 12:18:41 -05:00
Justin Ruggles aef5150719 flac: only set channel layout if not previously set or on channel count change
Fixes Bug 402
2012-12-22 01:35:28 -05:00
Reinhard Tartler 9378be9f32 prepare 9_beta3 release 2012-12-21 15:16:33 +01:00
Martin Storsjö c7d4de3d73 rtpdec_vp8: Don't return known-broken packets
This is built on the assumption that the first partition of each
VP8 packet is essential for decoding any later packet - if this
partition is broken/missed, the arithmetic coder gets out of sync
and decoding the bitstream in further packet ends up with total
garbage. If packets of a frame are lost, make sure the first
partition is intact (return only this part of the packet, nothing
else), otherwise stop returning data until the next keyframe is
received.

Alternatively, one would simply not return any packets at all
until the next keyframe, if packet loss is detected.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-21 14:14:47 +02:00
Martin Storsjö 90c784cc13 rtpdec: Pass the sequence number to depacketizers
This allows depacketizers to figure out if packets have been lost.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-21 14:14:40 +02:00
Diego Biurrun 0a0e340f5b configure: Make avconv depend on null, anull and resample filters
Building avconv without that functionality makes little sense.
2012-12-21 00:21:53 +01:00
Diego Biurrun 69f086e0f9 build: avfilter: Remove duplicate compilation entry for vf_scale
vf_scale should not be unconditionally compiled even if disabled.
2012-12-21 00:18:34 +01:00
Diego Biurrun 511cf612ac miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
Luca Barbato 6906b19346 lavc: add missing files for arm
Across the many retouches those did not make the main commit.
2012-12-20 14:07:23 +01:00
Ronald S. Bultje 8c53d39e7f lavc: introduce VideoDSPContext
Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-20 13:40:45 +01:00
Martin Storsjö a925f723a9 rtp: Don't read priv_data unless it is allocated
This makes all users of rtpenc_chain (rtsp muxer, sapenc, mov
rtp hinting) work again, broken since 8034130e0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-20 14:25:49 +02:00
Björn Axelsson 1eaff98c83 flvenc: Check whether seeking back to the header succeeded
The FLV muxer tries to update the header in write_trailer, which is
impossible if writing to a pipe or network stream. Don't write header
data if seeking to the header fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-20 12:37:42 +02:00
Jernej Virag e30e8e311e sapenc: Pass the title on to the chained muxers
This makes sure it ends up in the SDP, providing a proper session name
in the SAP announcements.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-20 12:37:34 +02:00
Justin Ruggles b2fe6756e3 lavr: add option for dithering during sample format conversion to s16 2012-12-19 18:52:54 -05:00
Anton Khirnov 5823686261 mpeg12: do not decode extradata more than once.
Fixes CVE-2012-2803.

CC: libav-stable@libav.org
2012-12-19 22:32:54 +01:00
Anton Khirnov c661cb6672 cmdutils: pass number of groups to split_commandline().
This makes the code simpler and avoids mixing designated and
non-designated initializers in a potentially unsafe way in avconv.
2012-12-19 22:13:41 +01:00
Janne Grunau bb2bab92e7 mov: handle h263 and flv1 for codec_tag 'H','2','6','3'
The sample in https://bugzilla.libav.org/show_bug.cgi?id=393 and
samples/F4V/H263_NM_f.mp4 both have codec_tag H263 for different
codecs. H263 is apparently used by Flash Media Server for Sorensen
Spark videos.

Patch based on commit 5442083b1c by
Carl Eugen Hoyos. Fixes bug 393.
2012-12-19 14:50:14 +01:00
Victor Lopez 1c8bf3bfed h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles
Fixes bug 396.

CC: libav-stable@libav.org
2012-12-19 13:40:48 +01:00
Janne Grunau 45635885e4 mpegvideo: increase edge_emu_buffer size for VC1
The VC1 decoder uses edge_emu_buffer simultaneously for luma and chroma
and needs more space. That was not a problem before f1d8763a02
since the size for edge_emu_buffer was always calculated with 2 byte per
pixel since the linesize was not known.

Fixes occasionally fate errors in vc1_sa10143.
2012-12-19 07:57:22 +01:00
Ronald S. Bultje a34d9ad969 lavc: merge latest x86inc.asm fixes with x264
Unbreak NASM support.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-19 07:27:33 +01:00
Janne Grunau acb571c89a avcodec: bump minor for adaptive h264 frame-mt
Also adds forgotten Changelog entry.
2012-12-18 20:26:53 +01:00
Anton Khirnov e82cb79adf avconv: pass the actually selected decoder to filter_codec_opts(). 2012-12-18 20:15:06 +01:00
Anton Khirnov 77bd1bc73a avconv: use new options parser. 2012-12-18 20:14:54 +01:00
Anton Khirnov 0ec1642b60 cmdutils: don't log an error in opt_default().
It results in spurious errors when using the new preparser.
2012-12-18 20:14:46 +01:00
Anton Khirnov 8c9af5b205 cmdutils: add a commandline pre-parser.
It splits the commandline into a more convenient internal representation
for further parsing.

This will allow e.g.
- processing global options first independently of their location on the
  commandline, eliminating ugly hacks for processing e.g. cpuflags
  first
- better options validation and error reporting. It is now possible for
  the parser to know that it's applying an input option to an output
  file or vice versa and act accordingly.
2012-12-18 20:13:55 +01:00
Anton Khirnov a01c02bcff cmdutils: split parse_option().
Separate the code that searches for the option to use and the code that
actually writes it. The writing code will be reused by the new options
parser.
2012-12-18 20:12:40 +01:00
Anton Khirnov 10bca66101 cmdutils: add a macro to simplify grow_array() calls. 2012-12-18 20:11:06 +01:00
Janne Grunau 9e696d2e5f h264: support frame parameter changes during frame-mt
Fixes CVE-2012-2782.
2012-12-18 19:55:10 +01:00
Janne Grunau f1d8763a02 mpegvideo: allocate scratch buffers after linesize is known
Since we can't know which stride a custom get_buffer() implementation is
going to use we have to allocate this scratch buffers after the linesize
is known. It was pretty safe for 8 bit per pixel pixel formats since we
always allocated memory for up to 16 bits per pixel. It broke hoever
with cmdutis.c's alloc_buffer() and high pixel bit depth since it
allocated larger edges than mpegvideo expected.

Fixes fuzzed sample nasa-8s2.ts_s244342.
2012-12-18 19:48:30 +01:00
Michael Niedermayer ed2d7d5868 ff_h264_direct_ref_list_init: fix B slice check.
Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-12-18 19:44:22 +01:00
Janne Grunau 73ad2c2fa7 h264: increase dist_scale_factor for up to 32 references
Compute dist_scale_factor_field only for MBAFF since that is the only
case in which it is used.
2012-12-18 19:36:58 +01:00
Diego Biurrun 523c7bd23c misc typo, style and wording fixes 2012-12-18 13:36:51 +01:00
Diego Biurrun ea061af15a configure: formatting cosmetics 2012-12-18 13:36:50 +01:00
Michael Niedermayer c9aab8a123 h264: use mbaff ref indices in fill_colmap() only for mbaff references
Prevents writing beyond array bounds.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-12-18 11:02:23 +01:00
Janne Grunau 61c6eef545 h264: prevent decoding of slice NALs in extradata
It is not posible to call get_buffer during frame-mt codec
initialization. Libavformat might pass huge amounts of data as
extradata after parsing broken files. The 'extradata' for the fuzzed
sample sample_varPAR_s5374_r001-02.avi is 2.8M large and contains
multiple slices.
2012-12-18 11:01:14 +01:00
Derek Buitenhuis 26e4f0c70f doxy: Clarify what avpriv_set_pts_info does
The "pts for a given stream" was nonsensical.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-12-17 11:20:00 -05:00
Diego Biurrun c35f0e8495 au: Reorder code so that both muxer and demuxer are under #ifdefs
This reduces code size when either piece has been disabled.
2012-12-17 17:02:22 +01:00
Diego Biurrun 4d6c96fd69 fate: Move RALF test into lossless audio group 2012-12-17 17:02:22 +01:00
Diego Biurrun 81c7c817a4 cosmetics: Use consistent names for multiple inclusion guards. 2012-12-17 17:02:22 +01:00
Hendrik Leppkes 0cf3505930 avresample: use valid log context in mixing functions
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-12-16 19:59:58 -05:00
Justin Ruggles f1c2915ce1 lavr: remove automatic context close/open for resampling compensation
It adds unnecessary complication for insignificant usability improvement.
The user really should know if they'll need resampling compensation before
opening the context.

Note that only the documentation has changed. The current functionality will
still work until the next major bump.
2012-12-16 19:26:17 -05:00
Justin Ruggles f322b20735 lavr: only save/restore the mixing matrix if mixing is being done 2012-12-16 19:26:17 -05:00
Martin Storsjö e798085f96 rtpdec_vp8: Cosmetics: Fix bad alignment/indentation
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-16 21:33:20 +02:00
Martin Storsjö 3b2e8d1d21 rtpenc: Allow including a SDES/CNAME block in RTCP SR packets
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-16 21:32:58 +02:00
Martin Storsjö 65e053271a rtpenc_vp8: Include the picture number in VP8 packets
This makes it easier for receivers to decide what to do if data
is lost.

Refactor calculating the max payload size, to avoid hardcoding the
header size in too many places, reducing the number of lines that
have to be touched if the header is adjusted further.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-12-16 21:32:13 +02:00
Janne Grunau a421bbfe83 h264: fix memleak on error during SPS parsing
Introduced in d7d6efe42b.
2012-12-15 19:16:39 +01:00
Janne Grunau 27c8337e59 h264-mt: handle NAL_DPAs before calling ff_thread_finish_setup
Since a NAL_DPA can start a new frame it has to be handled before
ff_thread_finish_setup is called.
2012-12-15 19:06:37 +01:00