Commit Graph
100 Commits
Author SHA1 Message Date
Justin Ruggles 0e830094ad samplefmt: avoid integer overflow in av_samples_get_buffer_size()
CC:libav-stable@libav.org
2014-02-04 12:32:47 -05:00
Justin RugglesandDerek Buitenhuis d01e684186 mov: do not set avg_frame_rate in the demuxer
The track duration is often not reliable or is not the duration
represented by the number of frames. In those cases, avg_frame_rate
was reported incorrectly. Removing this code falls back to the
default calculation in avformat_find_stream_info().

This is a partial revert of commit c3aeaa540.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-01-20 19:15:36 +00: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
Justin Ruggles be7c323176 Add a libwebp encoder 2013-12-21 17:01:42 -05:00
Justin Ruggles d085f80fa1 webp: add a special case for a huffman table with only 1 symbol
The vlc reader cannot handle 0-bit huffman codes. For most
situations WebP uses the "simple" huffman coding for this case,
but that will only handle symbols up to 255. For the LZ77 distance
codes, larger symbol values are needed, so it can happen in rare
cases that a normal huffman table is used that only has a single
symbol.
2013-12-05 20:37:06 -05:00
Justin Ruggles f51e3a1971 webp: do not call av_frame_free() on the user-provided frame
Fixes double-free on error.
2013-12-05 20:36:54 -05:00
Justin Ruggles 211ca69b13 lavr: check that current_buffer is not NULL before using it
Fixes a segfault during resampling when compiled with -DDEBUG.
Fixes all fate-lavr-resample tests with -DDEBUG.

CC:libav-stable@libav.org
2013-10-27 15:07:10 -04:00
Justin Ruggles c4bfa09807 Add a WebP decoder
Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org>
Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>
2013-09-18 14:10:05 -04:00
Justin Ruggles 9ae53c5860 lavc: add ff_u8_to_s8() for safe type punning of uint8_t to int8_t 2013-09-18 14:10:05 -04:00
Justin RugglesandJustin Ruggles 545a0b807c vf_fps: add 'start_time' option
This allows for dropping or duplication to match a particular start time.
2013-08-20 14:10:02 -04:00
Justin Ruggles 8000206abc libspeexdec: fix detection of final terminator code 2013-07-21 16:36:31 -04:00
Justin RugglesandDerek Buitenhuis e816a8bc26 ffmpeg: use actual packet pts when discarding for the copypriorss option
The ist->pts value at this point does not necessarily match the actual packet
pts, which is what should be used to decide whether to discard the packet.
Without this change, some video packets that have pts on or after the start
time are getting discarded when they should not be.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-05-28 17:03:23 -04:00
Justin Ruggles e46a2a7309 flvdec: read audio sample size and channels metadata
This is needed in order for the FLV demuxer not to detect a codec change when
using the "flv_metadata" option.
2013-03-28 06:27:28 -04:00
Justin Ruggles c3d0157753 flvdec: use the correct audio codec id when parsing metadata 2013-03-28 06:27:28 -04:00
Justin Ruggles 486f0b0cfc png: use av_mallocz_array() for the zlib zalloc function
Fixes valgrind uninitialized memory errors when decoding png.

CC:libav-stable@libav.org
2013-03-08 14:52:21 -05:00
Justin Ruggles e984f47873 libmp3lame: use the correct remaining buffer size when flushing
CC:libav-stable@libav.org
2013-03-08 14:52:05 -05:00
Justin Ruggles d925cca95f avconv: remove an unused variable 2013-02-25 15:15:22 -05:00
Justin Ruggles e8da807537 cmdutils: only use libavresample when it is enabled
avprobe and avserver use cmdutils and do not strictly require libavresample.
2013-02-25 15:15:21 -05:00
Justin Ruggles e951b6d94c vorbisdec: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Justin Ruggles 699d02b839 libschroedinger: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Justin Ruggles 09031b4639 vorbisenc: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Justin Ruggles 5c7db097eb avconv: pass libavresample options to AVFilterGraph 2013-02-23 17:07:54 -05:00
Justin Ruggles 9f1223562e lavfi: connect libavresample options to af_resample via AVFilterGraph 2013-02-23 17:07:54 -05:00
Justin Ruggles b2eea615c0 lavr: allow setting internal_sample_fmt option by string 2013-02-23 17:07:54 -05:00
Justin Ruggles 50f4337a2f lavr: Add "resample_cutoff" option as a duplicate of "cutoff"
Avoids an option name conflict with libavcodec, which is needed in order
to work properly with avconv.
2013-02-23 17:07:54 -05:00
Justin Ruggles d7c450436f ac3dec: validate channel output mode against channel count
Damaged frames can lead to a mismatch, which can cause a segfault
due to using an incorrect channel mapping.

CC:libav-stable@libav.org
2013-02-23 16:59:39 -05:00
Justin Ruggles 157542ebc1 lavr: fix mixing matrix reduction when normalization is disabled
In some cases when an input contributes fully to the corresponding
output, other inputs may also contribute to the same output. This is the
case, for example, for the default 5.1 to stereo downmix matrix without
normalization.
2013-02-12 13:41:13 -05:00
Justin Ruggles 600b4c973f lavr: fix matrix reduction for upmixing in certain cases
Do not skip an output if the corresponding input contributes to other output
channels.
2013-02-12 13:41:13 -05:00
Justin Ruggles a3735bb92a lavr: cosmetics: reindent 2013-02-12 13:41:13 -05:00
Justin Ruggles 1647da89dd lavr: make sure that the mix function is reset even if no mixing will be done
If the matrix reduction ends up with no mixing matrix needed, we need to still
reset the mix function accordingly and log the info to the user.
2013-02-12 13:41:09 -05:00
Justin Ruggles 646831e697 lavr: print out the mix matrix in ff_audio_mix_set_matrix()
This will print the new matrix if it is set after initialization.
2013-02-12 13:35:04 -05:00
Justin Ruggles 205a95f7b5 wmaenc: alloc/free coded_frame instead of keeping it in the WMACodecContext 2013-02-12 12:22:40 -05:00
Justin Ruggles 8ae50d87e7 ws-snd1: decode directly to the user-provided AVFrame 2013-02-12 12:22:40 -05:00
Justin Ruggles c815ca3641 wma: decode directly to the user-provided AVFrame 2013-02-12 12:22:40 -05:00
Justin Ruggles 5a7288822f wmavoice: decode directly to the user-provided AVFrame 2013-02-12 12:22:40 -05:00
Justin Ruggles ee6ca11b65 vorbis: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles 4a2b26fc1b tak: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles f4a283eec4 wmapro: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles f80f8dd4c2 vmdaudio: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles 903b62cc0b smackaud: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles 9873d71f31 wavpack: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles 3b7d43383f twinvq: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles 09d6831f49 sipr: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles ad2104ba44 tta: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles 3997fef952 truespeech: decode directly to the user-provided AVFrame 2013-02-12 12:22:39 -05:00
Justin Ruggles 5d5c248c3d s302m: decode directly to the user-provided AVFrame 2013-02-12 12:22:38 -05:00
Justin Ruggles fed74c0ae4 shorten: decode directly to the user-provided AVFrame 2013-02-12 12:22:38 -05:00
Justin Ruggles 79fb2a1f17 ra288: decode directly to the user-provided AVFrame 2013-02-12 12:22:38 -05:00
Justin Ruggles 1b9b6d6e5e qcelp: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles 86bfcfcf23 mace: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles f7e8c87c02 ra144: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles 0905c96390 pcm-bluray: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles cbeb3ed38d ralf: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles 0fe4056f95 nellymoser: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles e01e1a4673 qdm2: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles 3a23752c5a mpc7/8: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles 2c785e250a mpegaudio: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles dc33fbbfd0 mlp/truehd: decode directly to the user-provided AVFrame 2013-02-12 12:21:23 -05:00
Justin Ruggles a8ea936a0a libilbc: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles cb7b47a61d g726: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 182821cff4 dca: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles bed957bb11 libspeex: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles b878867128 dpcm: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 7e52fd6bca g723.1: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 7b78321597 cook: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 19b2cb268f libopus: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 9b28e58357 imc/iac: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 036e9b045f g722: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 0cd08367dd libopencore-amr: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 6fdfdb23d3 gsm: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles b8e9c99ef1 flac: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 4f69612d3e libgsm: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 97c7bdc6d4 cinaudio: decode directly to the user-provided AVFrame 2013-02-12 12:21:22 -05:00
Justin Ruggles 5cc0bd2cb4 binkaudio: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles e3db34291f amrnb: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles e57daa876b adpcm: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles cddf8998f1 comfortnoise: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles 9a75ace2b2 atrac3: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles 9b0b355e97 als: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles 55d2e12aef ac3: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles e42e5a89d6 bmvaudio: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles 0ded61b57a atrac1: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles 5cd597f22f alac: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles ffd2123095 aac: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles a6bb39add2 pcm: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles 5932e2d7d2 ape: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles bae4f47938 adxenc: alloc/free coded_frame instead of keeping it in the ADXContext 2013-02-12 12:21:21 -05:00
Justin Ruggles a3de4010c2 8svx: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles da28bb3f4a amrwb: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin Ruggles 0588935e64 adx: decode directly to the user-provided AVFrame 2013-02-12 12:21:21 -05:00
Justin RugglesandLuca Barbato 38c1466ca4 dict: add av_dict_parse_string()
Can be used to set multiple key/value pairs from a string.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-25 17:20:03 +01:00
Justin Ruggles b90632d596 lavr: always reset mix function names and pointers in mix_function_init()
CC: libav-stable@libav.org
2013-01-17 19:27:01 -05:00
Justin Ruggles f07ef2d9c9 lavr: call mix_function_init() in ff_audio_mix_set_matrix()
This is needed if a custom matrix is set by the user after opening the
AVAudioResampleContext because the matrix channel count can change if
different mixing coefficients are used.

CC:libav-stable@libav.org
2013-01-17 19:27:01 -05:00
Justin Ruggles b805c725a3 idcin: fix memleaks in idcin_read_packet()
Fixes fate-id-cin-video failures when running FATE with valgrind.
2013-01-16 12:21:35 -05:00
Justin RugglesandLuca Barbato e034cc6c60 lavc: Move vector_fmul_window to AVFloatDSPContext
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-16 10:45:45 +01:00
Justin Ruggles 23098bbd50 vf_fps: add final flushed frames to the dropped frame count 2013-01-15 11:26:46 -05:00
Justin Ruggles 5d0450461f idcin: better error handling
Add some additional checks for EOF and print error messages on an incomplete
header or packet.

FATE reference updated for id-cin-video due to the demuxer no longer
returning a partial video packet at EOF.
2013-01-09 14:49:07 -05:00
Justin Ruggles 06deaf8ad3 idcin: return 0 from idcin_read_packet() on success.
This matches the AVInputFormat.read_packet() API.
2013-01-09 14:49:07 -05:00
Justin Ruggles 7040e479a1 idcin: allow seeking back to the first packet
Also, do not allow seek-by-byte, as there is no way to find the next packet
boundary.
2013-01-09 14:49:06 -05:00
Justin Ruggles ccc0ffb1ba idcin: set start_time and packet duration instead of manually tracking pts.
Also, use 1 / sample_rate for audio stream time_base.
2013-01-09 14:49:06 -05:00