Anton Khirnov
4673a5a761
vf_overlay: properly sync inputs.
...
Right now it incorrectly assumes that the frames are sent in the proper
order, which worked with old ffmpeg and avconv versions by accident.
2012-10-04 10:23:25 +02:00
Anton Khirnov
ab35ec29a4
vf_overlay: get rid of pointless messing with timebase.
...
Output frames correspond 1:1 to input frames on the main input.
So use the main input timebase for output.
2012-10-04 10:21:58 +02:00
Anton Khirnov
cd15b7c03d
samplefmt: make av_samples_alloc() initialize the data to silence.
...
Right now the buffer is zeroed, which does not represent silence for U8(P).
2012-10-04 08:05:21 +02:00
Anton Khirnov
0f583d20d5
mpeg12: fix the semantics of the int* parameter of decode()
...
It is got_output, not data_size.
2012-09-29 19:18:39 +02:00
Anton Khirnov
d9a2e87b1c
mpeg12: move mpeg_decode_frame() lower
...
Avoids a forward declaration of decode_chunks().
2012-09-29 19:18:24 +02:00
Anton Khirnov
d05f72c754
dfa: improve boundary checks in decode_dds1()
...
Fixes CVE-2012-2798
CC:libav-stable@libav.org
2012-09-29 19:17:07 +02:00
Anton Khirnov
6a99310fce
wmalosslessdec: Fix reading too many bits in decode_channel_residues()
...
Fixes a part of CVE-2012-2795
CC:libav-stable@libav.org
Based on a patch by Michael Niedermayer <michaelni@gmx.at >
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 19:16:32 +02:00
Anton Khirnov
ae3da0ae55
indeo4/5: check empty tile size in decode_mb_info().
...
This prevents writing into a too small array if some parameters changed
without the tile being reallocated.
Based on a patch by Michael Niedermayer <michaelni@gmx.at >
Fixes CVE-2012-2800
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 19:13:45 +02:00
Anton Khirnov
5d2170c53b
ivi_common: make ff_ivi_process_empty_tile() static.
...
It's not used outside of ivi_common.c
2012-09-29 19:12:57 +02:00
Anton Khirnov
e4d4044339
indeo3: fix out of cell write.
...
Fixes CVE-2012-2776.
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 19:12:04 +02:00
Anton Khirnov
065b3a1cfa
wmalosslessdec: increase channel_coeffs/residues size
...
Fixes CVE-2012-2792
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 10:29:53 +02:00
Anton Khirnov
4a969030e4
wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14.
2012-09-29 10:29:52 +02:00
Anton Khirnov
0af49a63c7
avidec: use actually read size instead of requested size
...
Fixes CVE-2012-2788
2012-09-29 09:27:59 +02:00
Anton Khirnov
eeade678f0
avidec: return 0, not packet size from read_packet().
2012-09-29 09:27:51 +02:00
Anton Khirnov
ee715f49a0
dfa: check that the caller set width/height properly.
...
Fixes CVE-2012-2786.
2012-09-29 09:27:08 +02:00
Anton Khirnov
12e1e83461
lavc: set channel count from channel layout in avcodec_open2().
...
Some decoders (e.g. nellymoser) only set channel_layout and do not set
channel count.
2012-09-29 09:25:40 +02:00
Anton Khirnov and Luca Barbato
7a1a9dd56c
pthread: make sure AVFrame.extended_data is set properly.
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2012-09-25 12:03:23 +02:00
Anton Khirnov
11d1ca4b2c
Use avcodec_free_frame() to free AVFrames.
2012-09-24 12:31:25 +02:00
Anton Khirnov
9eb296572e
lavf: use a malloced AVFrame in try_decode_frame().
...
This allows using avcodec_free_frame() to free it properly.
2012-09-24 12:31:24 +02:00
Anton Khirnov
a42aadabc6
lavc: add avcodec_free_frame().
...
Since an AVFrame now has malloced members (extended_data), it must have
a destructor.
2012-09-24 12:31:24 +02:00
Anton Khirnov
b437cec143
lavc: ensure extended_data is set properly on decoding
2012-09-24 12:31:24 +02:00
Anton Khirnov
2bc0de3858
lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()
2012-09-24 12:31:24 +02:00
Anton Khirnov
c084a975aa
lavc: use av_mallocz to allocate AVFrames.
...
Otherwise the frame is uninitialized, so avcodec_get_frame_defaults()
cannot determine whether to free extended_data.
2012-09-24 12:31:24 +02:00
Anton Khirnov
a83499b13b
lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults
...
AVFrame is used for both audio and video, so calling the argument 'pic'
is misleading.
2012-09-24 12:31:24 +02:00
Anton Khirnov
e52e4fe10d
libx264: add forgotten ;
2012-09-21 09:20:09 +02:00
Anton Khirnov
87b017a298
matroskadec: fix a sanity check.
2012-09-21 09:15:07 +02:00
Anton Khirnov
bdb939ad73
matroskadec: only return corrupt packets that actually contain data
...
Fixes bug 372.
2012-09-21 09:15:01 +02:00
Anton Khirnov
1cc569ddda
lavf: zero data/size of the packet passed to read_packet().
2012-09-21 09:14:37 +02:00
Anton Khirnov
50d1f4437b
mp3dec: read Xing frame TOC index
2012-09-19 20:59:45 +02:00
Anton Khirnov
2d1a1a7f62
mp3dec: use named constants for Xing header flags
2012-09-19 20:59:44 +02:00
Anton Khirnov
e3496e5dbe
avfiltergraph: silence an uninitialized variable warning
...
The warning is:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:528:9: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
libavfilter/avfiltergraph.c:479:13: note: ‘best_idx’ was declared here
Initialize it to an invalid value and add an assert that it's properly
set later.
2012-09-17 15:48:20 +02:00
Anton Khirnov
34ebbbfeec
xsubenc: reindent
2012-09-17 15:48:20 +02:00
Anton Khirnov
466b39efaf
lavc: replace AVCodecContext.encode with subtitle-specific callback
...
AVCodecContext.encode is currently used only for subtitles, encode2 is
used for audio and video.
2012-09-17 15:48:20 +02:00
Anton Khirnov
9f64c8219a
lavc: add const to private codec class initialization.
...
Silences a warning about discarding const.
2012-09-17 15:48:20 +02:00
Anton Khirnov
58dee6e62d
avconv: don't pass a bogus parameter to avfilter_graph_create_filter().
...
The buffer sink does not take any parameters.
Fixes an uninitialized variable warning.
2012-09-17 15:48:20 +02:00
Anton Khirnov
4e48aa8656
buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame()
2012-09-17 15:48:20 +02:00
Anton Khirnov
66f52d0c3d
nellymoserdec: drop support for s16 output.
...
It internally decodes as float and then converts to s16 by a call to
float_to_int16(). The caller can do this just as well by using lavr.
2012-09-16 09:44:26 +02:00
Anton Khirnov
8b78c2969a
bmpdec: only initialize palette for pal8.
...
Gray8 is not considered to be paletted, so this would cause an invalid
write.
Fixes bug 367.
CC: libav-stable@libav.org
2012-09-16 09:43:17 +02:00
Anton Khirnov
7040c9fac2
mp3enc: write Xing TOC
...
Based on the code by:
Peter Belkner <pbelkner@snafu.de >,
Michael Niedermayer <michaelni@gmx.at >,
Clément Bœsch <clement.boesch@smartjog.com >,
Reimar Döffinger <Reimar.Doeffinger@gmx.de >, and
Tobias Rapp <t.rapp@noa-audio.com >
Alex Converse <alex.converse@gmail.com >
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2012-09-15 18:25:34 +02:00
Anton Khirnov
3b4bb19e63
lavf: flush the output AVIOContext in av_write_trailer().
...
This is consistent with stdio and is what we want to do in all cases.
Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results.
2012-09-15 18:25:07 +02:00
Anton Khirnov
0c270239c2
lavf: cosmetics, reformat av_write_trailer().
2012-09-15 18:24:59 +02:00
Anton Khirnov
990450c5bf
cmdutils: avoid setting data pointers to invalid values in alloc_buffer()
...
Fixes bug 352.
2012-09-15 14:59:29 +02:00
Anton Khirnov
0e8dccb79b
avplay: get rid of ugly casts in the options table
2012-09-11 09:19:03 +02:00
Anton Khirnov
4e82cbb629
avplay: fix prototypes for option callbacks.
...
They have been wrong since 11d957fbd8
2012-09-11 09:18:57 +02:00
Anton Khirnov
ee0dadc109
flvdec: always set AVFMTCTX_NOHEADER.
...
New streams may be created at any time, e.g. on codec change.
2012-09-11 09:13:29 +02:00
Anton Khirnov
91a84a5247
af_asyncts: check return value from lavr when flushing.
...
Fixes an infinite loop on flush when avresample_get_delay() still
reports some samples but avresample_convert() doesn't return any data.
2012-09-07 09:06:48 +02:00
Anton Khirnov
11d957fbd8
avtools: remove the distinction between func_arg and func2_arg.
...
func2_arg is the same as func_arg, except it has one additional
parameter. Change all func_arg callbacks to take that parameter (and
ignore it).
2012-08-30 13:56:25 +02:00
Anton Khirnov
bbcedade00
avconv: make the -passlogfile option per-stream.
2012-08-30 13:56:25 +02:00
Anton Khirnov
038c0b1e06
avconv: make the -pass option per-stream.
2012-08-30 13:56:24 +02:00
Anton Khirnov
e2785fa728
cmdutils: make -codecs print lossy/lossless flags.
2012-08-30 13:56:00 +02:00
Anton Khirnov
a2318326f1
lavc: add lossy/lossless codec properties.
2012-08-30 13:55:55 +02:00
Anton Khirnov
bbabeb56fa
Add reminders to update the codec descriptor list with new codec IDs.
2012-08-29 10:47:59 +02:00
Anton Khirnov
44b0b85fe9
avconv: prefer user-forced input framerate when choosing output framerate
2012-08-26 07:50:06 +02:00
Anton Khirnov
4d7adec8bd
AVOptions: store defaults for INT64 options in int64 union member.
...
Double does not have enough precision to represent all int64 numbers
exactly.
2012-08-24 11:25:06 +02:00
Anton Khirnov
a1bcc76e60
cmdutils: fix a memleak when specifying an option twice.
2012-08-24 11:25:06 +02:00
Anton Khirnov
7b44061f4b
doc/APIchanges: add an entry for codec descriptors.
...
Also fill in missing dates and hashes.
2012-08-23 08:51:04 +02:00
Anton Khirnov
677e763a55
mpegvideo_enc: remove stray duplicate line from 7f9aaa4
2012-08-20 10:05:49 +02:00
Anton Khirnov
602b1898e5
avconv: mark more options as expert.
2012-08-19 19:26:20 +02:00
Anton Khirnov
f9fada2704
avconv: split printing "main options" into global and per-file.
2012-08-19 19:23:43 +02:00
Anton Khirnov
6e3857fa8c
avconv: refactor help printing.
...
By default don't dump every single option on the user, but print only
the basic options.
Add -h long/full to print more options.
2012-08-19 19:23:17 +02:00
Anton Khirnov
f8b1e66553
avconv: print info/capabilities options in a separate help group.
2012-08-19 19:23:06 +02:00
Anton Khirnov
1136bd362a
avtools: add -h demuxer/muxer
2012-08-19 19:22:41 +02:00
Anton Khirnov
a3ad68d36c
cmdutils: extend -h to allow printing codec details.
2012-08-19 19:22:08 +02:00
Anton Khirnov
7c5012127f
cmdutils: change semantics of show_help_options() and document it.
...
Currently it takes a mask and value, such that options for which
(flags & mask) == value.
Change it to take required flags and forbidden flags instead. This is
shorter and simpler to understand.
2012-08-19 19:21:35 +02:00
Anton Khirnov
dc4c24a3d3
avtools: move some newlines to show_help_options().
...
Don't require every caller to supply them.
2012-08-19 19:21:03 +02:00
Anton Khirnov
79600a8354
avconv: deprecate -isync.
...
This option does not do anything.
Also remove OPT_GRAB, since -isync is the last option using it.
2012-08-19 19:20:14 +02:00
Anton Khirnov
8fc83fb081
avconv: reformat the options table.
2012-08-19 19:15:51 +02:00
Anton Khirnov
d3810c47fe
avconv: get rid of ugly casts in the options table.
2012-08-19 19:09:36 +02:00
Anton Khirnov
db4766ad1b
avconv: try to match codecs by codec descriptor name as a last resort.
...
This allows e.g. -c:v h264 to select the libx264 encoder.
2012-08-19 19:08:48 +02:00
Anton Khirnov
f617135bc9
avtools: fix show_foo() signatures.
...
show_foo() functions are declared as void show_foo(void), but called as
int show_foo(const char*, const char*).
2012-08-19 19:07:43 +02:00
Anton Khirnov
7f9aaa499b
mpegvideo_enc: don't use deprecated avcodec_encode_video().
2012-08-18 08:48:30 +02:00
Anton Khirnov
7c10194996
cmdutils: refactor -codecs option.
...
Make it print a list of AVCodecDescriptors.
Add new -decoders and -encoders options that print lists of decoders and
encoders respectively.
2012-08-18 08:48:30 +02:00
Anton Khirnov
3c0df90584
avconv: make -shortest a per-output file option.
2012-08-18 08:48:30 +02:00
Anton Khirnov
91e59fea30
lavc: add avcodec_descriptor_get_by_name().
2012-08-18 08:48:30 +02:00
Anton Khirnov
0a0f19b577
lavc: add const to AVCodec* function parameters.
2012-08-18 08:48:30 +02:00
Anton Khirnov
15c71dfd03
swf(dec): replace CODEC_ID with AV_CODEC_ID
2012-08-18 08:48:30 +02:00
Anton Khirnov
e0aa5e772b
dvenc: don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE
2012-08-18 08:48:30 +02:00
Anton Khirnov
661454aa28
api-example: use new video encoding API.
2012-08-15 08:45:27 +02:00
Anton Khirnov
885da7b082
lavf: simplify is_intra_only() by using codec descriptors.
2012-08-11 11:34:24 +02:00
Anton Khirnov
51efed152d
lavc: add an intra-only codec property.
2012-08-11 11:34:09 +02:00
Anton Khirnov
c223d79945
lavc: add codec descriptors.
...
They describe properties that are inherent to a codec (as described by
an AVCodecID) without referring to a specific implementation.
2012-08-11 11:32:11 +02:00
Anton Khirnov
2ff67c909c
lavc: fix mixing CODEC_ID/AV_CODEC_ID in C++ code.
...
C++ does not allow to mix different enums, so e.g. code comparing
ACodecID with CodecID would fail to compile with gcc.
This very evil hack should fix this problem.
2012-08-10 18:48:40 +02:00
Anton Khirnov
7ca14c731e
vsrc_movie: discourage its use with avconv.
2012-08-08 21:56:44 +02:00
Anton Khirnov
ab29609701
avconv: allow no input files.
...
It is now possible to use lavfi sources.
2012-08-08 21:56:26 +02:00
Anton Khirnov
a5fd7c607f
avconv: prevent invalid reads in transcode_init()
2012-08-08 21:55:54 +02:00
Anton Khirnov
57d2422559
avconv: rename OutputStream.is_past_recording_time to finished.
...
The new name is shorter and more accurate, since this variable is no
longer used only for checking recording time constraint.
2012-08-08 21:55:45 +02:00
Anton Khirnov
0c00fd80ee
avconv: split the code for processing input packets out of transcode()
2012-08-08 21:55:15 +02:00
Anton Khirnov
f154ef1ae5
avconv: send EOF to lavfi even if flushing the decoder fails
2012-08-08 20:16:29 +02:00
Anton Khirnov
cc2133b66a
avconv: get rid of pointless temporary variable.
2012-08-08 20:16:13 +02:00
Anton Khirnov
8391602913
avconv: simplify transcode().
...
Operate with a pointer to InputFile instead of its index in input_files.
2012-08-08 20:15:36 +02:00
Anton Khirnov
c0fbf9713c
avconv: cosmetics
...
Replace for (;foo == 0;) with while (!foo)
This is prettier.
2012-08-08 20:15:13 +02:00
Anton Khirnov
0b26ef4228
avconv: replace no_packet array in transcode() with a var in InputStream
...
This simplifies splitting code for reading from input out of
transcode().
2012-08-08 20:12:47 +02:00
Anton Khirnov
bed43d58b0
avconv: remove unused variable from InputFile.
2012-08-08 20:12:22 +02:00
Anton Khirnov
d64901f99d
avconv: remove commented out cruft.
2012-08-08 20:12:11 +02:00
Anton Khirnov
a4f5011065
avconv: maintain sync on lavfi outputs.
...
Before this commit, poll_filters() reads all frames available on each
lavfi output. This does not work for lavfi sources that produce
an unlimited number of frames, e.g. color and similar.
With this commit, poll_filters() reads from output with the lowest
timestamp and returns to wait for more input if no frames are available
on it.
2012-08-08 20:04:27 +02:00
Anton Khirnov
fe2147e936
avconv: split configuring filter configuration to a separate file.
2012-08-08 11:11:52 +02:00
Anton Khirnov
f5e668273a
avconv: split option parsing into a separate file.
2012-08-08 11:10:06 +02:00
Anton Khirnov
94364b7d42
mpegaudioenc: list supported channel layouts.
2012-08-08 07:53:48 +02:00
Anton Khirnov
927e92cdc7
mpegaudiodec: don't print an error on > 1 frame in a packet.
...
It's a perfectly normal situation, nothing to spam about.
2012-08-08 07:53:48 +02:00
Anton Khirnov
5702c8670e
api-example: update to new audio encoding API.
2012-08-08 07:53:47 +02:00