Anton Khirnov
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
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
2012-08-07 16:00:24 +02:00
Anton Khirnov
104e10fb42
lavc: add AV prefix to codec ids.
2012-08-07 15:56:39 +02:00
Anton Khirnov
921063877e
apetag: change a forgotten return to return 0
2012-07-31 21:32:25 +02:00
Anton Khirnov
f2ed006c90
mpc8: return more meaningful error codes.
2012-07-31 20:54:22 +02:00
Anton Khirnov
263dbe9d95
mpc: return more meaningful error codes.
2012-07-31 20:54:17 +02:00
Anton Khirnov
782e64fbe1
wv,mpc8: don't return apetag data in packets.
2012-07-31 20:53:54 +02:00
Anton Khirnov
29d70274ec
wv: K&R formatting cosmetics
2012-07-30 00:42:20 +02:00
Anton Khirnov
aba232cfa9
lavf: deprecate r_frame_rate.
...
According to its description, it is supposed to be the LCM of all the
frame durations. The usability of such a thing is vanishingly small,
especially since we cannot determine it with any amount of reliability.
Therefore get rid of it after the next bump.
Replace it with the average framerate where it makes sense.
FATE results for the wtv and xmv demux tests change. In the wtv case
this is caused by the file being corrupted (or possibly badly cut) and
containing invalid timestamps. This results in lavf estimating the
framerate wrong and making up wrong frame durations.
In the xmv case the file contains pts jumps, so again the estimated
framerate is far from anything sane and lavf again makes up different
frame durations.
In some other tests lavf starts making up frame durations from different
frame.
2012-07-29 08:06:30 +02:00
Anton Khirnov
f66eeff1c8
lavf: round estimated average fps to a "standard" fps.
2012-07-29 08:05:46 +02:00
Anton Khirnov
fe1c1198e6
lavf: use dts difference instead of AVPacket.duration in find_stream_info()
...
AVPacket.duration is mostly made up and thus completely useless, this is
especially true for video streams.
Therefore use dts difference for framerate estimation and
the max_analyze_duration check.
The asyncts test now needs -analyzeduration, because the default is 5
seconds and the audio stream in the sample appears at ~10 seconds.
2012-07-29 08:04:42 +02:00
Anton Khirnov
c1d865d563
wv: return meaningful error codes.
2012-07-28 14:37:16 +02:00
Anton Khirnov
ccc10acb5b
wv: return AVERROR_EOF on EOF, not EIO.
2012-07-28 14:37:12 +02:00
Anton Khirnov
f73e3938ac
mp3dec: forward errors for av_get_packet().
...
Don't invent a bogus EIO error.
The code now doesn't check for ret == 0, but that check is redundant,
av_get_packet() never returns 0.
2012-07-28 14:37:00 +02:00
Anton Khirnov
67b1156fe8
mp3dec: remove a pointless local variable.
2012-07-28 14:36:55 +02:00
Anton Khirnov
61f8bb74f3
mp3dec: remove commented out cruft.
2012-07-28 14:36:51 +02:00
Anton Khirnov
b3fa478823
lavfi: bump minor to mark stabilizing the ABI.
2012-07-28 14:33:48 +02:00