Compare commits
103 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2588178669 | ||
![]() |
12cb64e8d9 | ||
![]() |
ae668a283d | ||
![]() |
2c66058737 | ||
![]() |
813b3d11e0 | ||
![]() |
29ff1a5f1a | ||
![]() |
f504049b22 | ||
![]() |
c446bc31f5 | ||
![]() |
52fa7a8603 | ||
![]() |
d814b9b51d | ||
![]() |
1d285db8a3 | ||
![]() |
cd24fdad47 | ||
![]() |
ee57bfc47a | ||
![]() |
4a442ac117 | ||
![]() |
d8c4ee6fea | ||
![]() |
e32acc455d | ||
![]() |
6f2f754d97 | ||
![]() |
f072b69f39 | ||
![]() |
e489d5c54d | ||
![]() |
5888e656ce | ||
![]() |
9fef5d5553 | ||
![]() |
6e2fb5cd73 | ||
![]() |
aef81fa75d | ||
![]() |
13cf445358 | ||
![]() |
83d5871cf1 | ||
![]() |
bd6e58d5ca | ||
![]() |
fe995dcd84 | ||
![]() |
9b481654e1 | ||
![]() |
f2310fff5c | ||
![]() |
125fe08492 | ||
![]() |
e45f0f0f66 | ||
![]() |
becde6ab1c | ||
![]() |
eeb8dabd29 | ||
![]() |
94576cec54 | ||
![]() |
2f00d28aa0 | ||
![]() |
dbe57f7e9f | ||
![]() |
4bee3eba75 | ||
![]() |
2440424f1d | ||
![]() |
31f337c1e4 | ||
![]() |
f84ddb0c0f | ||
![]() |
bbefdb3938 | ||
![]() |
cc0662daef | ||
![]() |
10d59d29bc | ||
![]() |
7fc39f51cd | ||
![]() |
f49b2a9d08 | ||
![]() |
98dfe0d8bd | ||
![]() |
08be125dde | ||
![]() |
e20a019c91 | ||
![]() |
16ac9edc2f | ||
![]() |
164628e2f7 | ||
![]() |
044177215e | ||
![]() |
d034ddcd1f | ||
![]() |
676df8c4c7 | ||
![]() |
1ddb0b6fa0 | ||
![]() |
e35da91b52 | ||
![]() |
82213d67ba | ||
![]() |
d17b9469c9 | ||
![]() |
534c0df6e0 | ||
![]() |
f62537d9f1 | ||
![]() |
4f873341b4 | ||
![]() |
857a037945 | ||
![]() |
8ffe243c85 | ||
![]() |
62e5503407 | ||
![]() |
e6324ccfbd | ||
![]() |
8cfd33fd35 | ||
![]() |
ab70fa28f6 | ||
![]() |
3a21007e47 | ||
![]() |
5877811b0f | ||
![]() |
c69709571a | ||
![]() |
97a740acc5 | ||
![]() |
02f241d1ed | ||
![]() |
cc64871bd8 | ||
![]() |
fcd0e3235a | ||
![]() |
4c2b6ce26c | ||
![]() |
98d06b046d | ||
![]() |
397e769f74 | ||
![]() |
140ca8f6c0 | ||
![]() |
169d849344 | ||
![]() |
9c659b3a67 | ||
![]() |
1690c1fa88 | ||
![]() |
3f27158040 | ||
![]() |
c459c7b23e | ||
![]() |
08e2c7a45f | ||
![]() |
89e16e675d | ||
![]() |
4cd1dad91a | ||
![]() |
3e196e4def | ||
![]() |
2502914c5f | ||
![]() |
6df0d3e291 | ||
![]() |
85a14dbd5d | ||
![]() |
db0f7f7394 | ||
![]() |
b666debffe | ||
![]() |
c3744b415a | ||
![]() |
7df878ac15 | ||
![]() |
bc58fe0309 | ||
![]() |
8eda888683 | ||
![]() |
f3144b0cc6 | ||
![]() |
86f072ceb3 | ||
![]() |
21185028b4 | ||
![]() |
0c2a350762 | ||
![]() |
299dc3baea | ||
![]() |
5c1a1b47f3 | ||
![]() |
4f8b7eb87f | ||
![]() |
d807022283 |
2
Doxyfile
2
Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 1.0.3
|
||||
PROJECT_NUMBER = 1.0.7
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
@@ -408,10 +408,11 @@ x86 Michael Niedermayer
|
||||
Releases
|
||||
========
|
||||
|
||||
1.2 Michael Niedermayer
|
||||
1.1 Michael Niedermayer
|
||||
1.0 Michael Niedermayer
|
||||
0.11 Michael Niedermayer
|
||||
0.10 Michael Niedermayer
|
||||
|
||||
If you want to maintain an older release, please contact us
|
||||
|
||||
|
||||
GnuPG Fingerprints of maintainers and contributors
|
||||
|
@@ -61,7 +61,7 @@ struct SwsContext *sws_opts;
|
||||
SwrContext *swr_opts;
|
||||
AVDictionary *format_opts, *codec_opts;
|
||||
|
||||
const int this_year = 2012;
|
||||
const int this_year = 2013;
|
||||
|
||||
static FILE *report_file;
|
||||
|
||||
|
@@ -190,13 +190,13 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
||||
void show_help_children(const AVClass *class, int flags);
|
||||
|
||||
/**
|
||||
* Per-avtool specific help handler. Implemented in each
|
||||
* avtool, called by show_help().
|
||||
* Per-fftool specific help handler. Implemented in each
|
||||
* fftool, called by show_help().
|
||||
*/
|
||||
void show_help_default(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Generic -h handler common to all avtools.
|
||||
* Generic -h handler common to all fftools.
|
||||
*/
|
||||
int show_help(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
|
2
configure
vendored
2
configure
vendored
@@ -3893,11 +3893,13 @@ elif enabled gcc; then
|
||||
check_cflags -fno-tree-vectorize
|
||||
check_cflags -Werror=implicit-function-declaration
|
||||
check_cflags -Werror=missing-prototypes
|
||||
check_cflags -Werror=return-type
|
||||
elif enabled llvm_gcc; then
|
||||
check_cflags -mllvm -stack-alignment=16
|
||||
elif enabled clang; then
|
||||
check_cflags -mllvm -stack-alignment=16
|
||||
check_cflags -Qunused-arguments
|
||||
check_cflags -Werror=return-type
|
||||
elif enabled armcc; then
|
||||
# 2523: use of inline assembler is deprecated
|
||||
add_cflags -W${armcc_opt},--diag_suppress=2523
|
||||
|
304
doc/APIchanges
304
doc/APIchanges
@@ -102,90 +102,90 @@ API changes, most recent first:
|
||||
Add codec descriptors for accessing codec properties without having
|
||||
to refer to a specific decoder or encoder.
|
||||
|
||||
c223d79 - Add an AVCodecDescriptor struct and functions
|
||||
f5f3684 / c223d79 - Add an AVCodecDescriptor struct and functions
|
||||
avcodec_descriptor_get() and avcodec_descriptor_next().
|
||||
51efed1 - Add AVCodecDescriptor.props and AV_CODEC_PROP_INTRA_ONLY.
|
||||
91e59fe - Add avcodec_descriptor_get_by_name().
|
||||
f5f3684 / 51efed1 - Add AVCodecDescriptor.props and AV_CODEC_PROP_INTRA_ONLY.
|
||||
6c180b3 / 91e59fe - Add avcodec_descriptor_get_by_name().
|
||||
|
||||
2012-08-08 - 987170c - lavu 51.38 - dict.h
|
||||
2012-08-08 - f5f3684 / 987170c - lavu 51.68.100 / 51.38.0 - dict.h
|
||||
Add av_dict_count().
|
||||
|
||||
2012-08-07 - 104e10f - lavc 54.25 - avcodec.h
|
||||
2012-08-07 - 7a72695 / 104e10f - lavc 54.51.100 / 54.25.0 - avcodec.h
|
||||
Rename CodecID to AVCodecID and all CODEC_ID_* to AV_CODEC_ID_*.
|
||||
To provide backwards compatibility, CodecID is now #defined as AVCodecID.
|
||||
Note that this can break user code that includes avcodec.h and uses the
|
||||
'CodecID' identifier. Such code should either #undef CodecID or stop using the
|
||||
CodecID name.
|
||||
|
||||
2012-08-03 - 239fdf1 - lavu 51.37.1 - cpu.h
|
||||
2012-08-03 - e776ee8 / 239fdf1 - lavu 51.66.101 / 51.37.1 - cpu.h
|
||||
lsws 2.1.1 - swscale.h
|
||||
Rename AV_CPU_FLAG_MMX2 ---> AV_CPU_FLAG_MMXEXT.
|
||||
Rename SWS_CPU_CAPS_MMX2 ---> SWS_CPU_CAPS_MMXEXT.
|
||||
|
||||
2012-07-29 - 681ed00 - lavf 54.13.0 - avformat.h
|
||||
2012-07-29 - 7c26761 / 681ed00 - lavf 54.22.100 / 54.13.0 - avformat.h
|
||||
Add AVFMT_FLAG_NOBUFFER for low latency use cases.
|
||||
|
||||
2012-07-10 - 5fade8a - lavu 51.37.0
|
||||
Add av_malloc_array() and av_mallocz_array()
|
||||
|
||||
2012-06-22 - d3d3a32 - lavu 51.34.0
|
||||
2012-06-22 - e847f41 / d3d3a32 - lavu 51.61.100 / 51.34.0
|
||||
Add av_usleep()
|
||||
|
||||
2012-06-20 - ae0a301 - lavu 51.33.0
|
||||
2012-06-20 - 4da42eb / ae0a301 - lavu 51.60.100 / 51.33.0
|
||||
Move av_gettime() to libavutil, add libavutil/time.h
|
||||
|
||||
2012-06-09 - 3971be0 - lavr 0.0.3
|
||||
2012-06-09 - 82edf67 / 3971be0 - lavr 0.0.3
|
||||
Add a parameter to avresample_build_matrix() for Dolby/DPLII downmixing.
|
||||
|
||||
2012-06-12 - 9baeff9 - lavfi 2.23.0 - avfilter.h
|
||||
2012-06-12 - c7b9eab / 9baeff9 - lavfi 2.79.100 / 2.23.0 - avfilter.h
|
||||
Add AVFilterContext.nb_inputs/outputs. Deprecate
|
||||
AVFilterContext.input/output_count.
|
||||
|
||||
2012-06-12 - 84b9fbe - lavfi 2.22.0 - avfilter.h
|
||||
2012-06-12 - c7b9eab / 84b9fbe - lavfi 2.79.100 / 2.22.0 - avfilter.h
|
||||
Add avfilter_pad_get_type() and avfilter_pad_get_name(). Those
|
||||
should now be used instead of accessing AVFilterPad members
|
||||
directly.
|
||||
|
||||
2012-06-12 - b0f0dfc - lavu 51.32.0 - audioconvert.h
|
||||
2012-06-12 - 3630a07 / b0f0dfc - lavu 51.57.100 / 51.32.0 - audioconvert.h
|
||||
Add av_get_channel_layout_channel_index(), av_get_channel_name()
|
||||
and av_channel_layout_extract_channel().
|
||||
|
||||
2012-05-25 - 154486f - lavu 51.31.0 - opt.h
|
||||
2012-05-25 - 53ce990 / 154486f - lavu 51.55.100 / 51.31.0 - opt.h
|
||||
Add av_opt_set_bin()
|
||||
|
||||
2012-05-15 - lavfi 2.17.0
|
||||
2012-05-15 - lavfi 2.74.100 / 2.17.0
|
||||
Add support for audio filters
|
||||
ac71230/a2cd9be - add video/audio buffer sink in a new installed
|
||||
61930bd / ac71230, 1cbf7fb / a2cd9be - add video/audio buffer sink in a new installed
|
||||
header buffersink.h
|
||||
720c6b7 - add av_buffersrc_write_frame(), deprecate
|
||||
1cbf7fb / 720c6b7 - add av_buffersrc_write_frame(), deprecate
|
||||
av_vsrc_buffer_add_frame()
|
||||
ab16504 - add avfilter_copy_buf_props()
|
||||
9453c9e - add extended_data to AVFilterBuffer
|
||||
1b8c927 - add avfilter_get_audio_buffer_ref_from_arrays()
|
||||
61930bd / ab16504 - add avfilter_copy_buf_props()
|
||||
61930bd / 9453c9e - add extended_data to AVFilterBuffer
|
||||
61930bd / 1b8c927 - add avfilter_get_audio_buffer_ref_from_arrays()
|
||||
|
||||
2012-05-09 - lavu 51.30.0 - samplefmt.h
|
||||
142e740 - add av_samples_copy()
|
||||
6d7f617 - add av_samples_set_silence()
|
||||
2012-05-09 - lavu 51.53.100 / 51.30.0 - samplefmt.h
|
||||
61930bd / 142e740 - add av_samples_copy()
|
||||
61930bd / 6d7f617 - add av_samples_set_silence()
|
||||
|
||||
2012-05-09 - a5117a2 - lavc 54.13.1
|
||||
2012-05-09 - 61930bd / a5117a2 - lavc 54.21.101 / 54.13.1
|
||||
For audio formats with fixed frame size, the last frame
|
||||
no longer needs to be padded with silence, libavcodec
|
||||
will handle this internally (effectively all encoders
|
||||
behave as if they had CODEC_CAP_SMALL_LAST_FRAME set).
|
||||
|
||||
2012-05-07 - 828bd08 - lavc 54.13.0 - avcodec.h
|
||||
2012-05-07 - 653d117 / 828bd08 - lavc 54.20.100 / 54.13.0 - avcodec.h
|
||||
Add sample_rate and channel_layout fields to AVFrame.
|
||||
|
||||
2012-05-01 - 4010d72 - lavr 0.0.1
|
||||
2012-05-01 - 2330eb1 / 4010d72 - lavr 0.0.1
|
||||
Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8.
|
||||
|
||||
2012-04-25 - 3527a73 - lavu 51.29.0 - cpu.h
|
||||
2012-04-25 - e890b68 / 3527a73 - lavu 51.48.100 / 51.29.0 - cpu.h
|
||||
Add av_parse_cpu_flags()
|
||||
|
||||
2012-04-24 - c8af852 - lavr 0.0.0
|
||||
2012-04-24 - 3ead79e / c8af852 - lavr 0.0.0
|
||||
Add libavresample audio conversion library
|
||||
|
||||
2012-04-20 - 0c0d1bc - lavu 51.28.0 - audio_fifo.h
|
||||
2012-04-20 - 3194ab7 / 0c0d1bc - lavu 51.47.100 / 51.28.0 - audio_fifo.h
|
||||
Add audio FIFO functions:
|
||||
av_audio_fifo_free()
|
||||
av_audio_fifo_alloc()
|
||||
@@ -197,10 +197,10 @@ API changes, most recent first:
|
||||
av_audio_fifo_size()
|
||||
av_audio_fifo_space()
|
||||
|
||||
2012-04-14 - lavfi 2.16.0 - avfiltergraph.h
|
||||
d7bcc71 Add avfilter_graph_parse2().
|
||||
2012-04-14 - lavfi 2.70.100 / 2.16.0 - avfiltergraph.h
|
||||
7432bcf / d7bcc71 Add avfilter_graph_parse2().
|
||||
|
||||
2012-04-08 - 4d693b0 - lavu 51.27.0 - samplefmt.h
|
||||
2012-04-08 - 6bfb304 / 4d693b0 - lavu 51.46.100 / 51.27.0 - samplefmt.h
|
||||
Add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()
|
||||
|
||||
2012-03-21 - b75c67d - lavu 51.43.100
|
||||
@@ -228,69 +228,69 @@ API changes, most recent first:
|
||||
2012-01-24 - 0c3577b - lavfi 2.60.100
|
||||
Add avfilter_graph_dump.
|
||||
|
||||
2012-03-05 - lavc 54.8.0
|
||||
6699d07 Add av_get_exact_bits_per_sample()
|
||||
9524cf7 Add av_get_audio_frame_duration()
|
||||
2012-03-05 - lavc 54.10.100 / 54.8.0
|
||||
f095391 / 6699d07 Add av_get_exact_bits_per_sample()
|
||||
f095391 / 9524cf7 Add av_get_audio_frame_duration()
|
||||
|
||||
2012-03-04 - 44fe77b - lavc 54.7.0 - avcodec.h
|
||||
2012-03-04 - 2af8f2c / 44fe77b - lavc 54.8.100 / 54.7.0 - avcodec.h
|
||||
Add av_codec_is_encoder/decoder().
|
||||
|
||||
2012-03-01 - 442c132 - lavc 54.3.0 - avcodec.h
|
||||
2012-03-01 - 1eb7f39 / 442c132 - lavc 54.5.100 / 54.3.0 - avcodec.h
|
||||
Add av_packet_shrink_side_data.
|
||||
|
||||
2012-02-29 - dd2a4bc - lavf 54.2.0 - avformat.h
|
||||
2012-02-29 - 79ae084 / dd2a4bc - lavf 54.2.100 / 54.2.0 - avformat.h
|
||||
Add AVStream.attached_pic and AV_DISPOSITION_ATTACHED_PIC,
|
||||
used for dealing with attached pictures/cover art.
|
||||
|
||||
2012-02-25 - c9bca80 - lavu 51.24.0 - error.h
|
||||
2012-02-25 - 305e4b3 / c9bca80 - lavu 51.41.100 / 51.24.0 - error.h
|
||||
Add AVERROR_UNKNOWN
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-02-20 - e9cda85 - lavc 54.2.0
|
||||
2012-02-20 - eadd426 / e9cda85 - lavc 54.2.100 / 54.2.0
|
||||
Add duration field to AVCodecParserContext
|
||||
|
||||
2012-02-20 - 0b42a93 - lavu 51.23.1 - mathematics.h
|
||||
2012-02-20 - eadd426 / 0b42a93 - lavu 51.40.100 / 51.23.1 - mathematics.h
|
||||
Add av_rescale_q_rnd()
|
||||
|
||||
2012-02-08 - 38d5533 - lavu 51.22.1 - pixdesc.h
|
||||
2012-02-08 - f2b20b7 / 38d5533 - lavu 51.38.101 / 51.22.1 - pixdesc.h
|
||||
Add PIX_FMT_PSEUDOPAL flag.
|
||||
|
||||
2012-02-08 - 52f82a1 - lavc 54.01.0
|
||||
2012-02-08 - f2b20b7 / 52f82a1 - lavc 54.2.100 / 54.1.0
|
||||
Add avcodec_encode_video2() and deprecate avcodec_encode_video().
|
||||
|
||||
2012-02-01 - 316fc74 - lavc 54.01.0
|
||||
2012-02-01 - 4c677df / 316fc74 - lavc 54.1.0
|
||||
Add av_fast_padded_malloc() as alternative for av_realloc() when aligned
|
||||
memory is required. The buffer will always have FF_INPUT_BUFFER_PADDING_SIZE
|
||||
zero-padded bytes at the end.
|
||||
|
||||
2012-01-31 - dd6d3b0 - lavf 54.01.0
|
||||
2012-01-31 - a369a6b / dd6d3b0 - lavf 54.1.0
|
||||
Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-01-31 - af08d9a - lavc 54.01.0
|
||||
2012-01-31 - a369a6b / af08d9a - lavc 54.1.0
|
||||
Add avcodec_is_open() function.
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-01-30 - 8b93312 - lavu 51.22.0 - intfloat.h
|
||||
2012-01-30 - 151ecc2 / 8b93312 - lavu 51.36.100 / 51.22.0 - intfloat.h
|
||||
Add a new installed header libavutil/intfloat.h with int/float punning
|
||||
functions.
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-01-25 - lavf 53.22.0
|
||||
f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible
|
||||
2012-01-25 - lavf 53.31.100 / 53.22.0
|
||||
3c5fe5b / f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible
|
||||
buffered data within a muxer. Added AVFMT_ALLOW_FLUSH for
|
||||
muxers supporting it (av_write_frame makes sure it is called
|
||||
only for muxers with this flag).
|
||||
|
||||
2012-01-15 - lavc 53.34.0
|
||||
2012-01-15 - lavc 53.56.105 / 53.34.0
|
||||
New audio encoding API:
|
||||
b2c75b6 Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio
|
||||
67f5650 / b2c75b6 Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio
|
||||
encoders.
|
||||
5ee5fa0 Add avcodec_fill_audio_frame() as a convenience function.
|
||||
b2c75b6 Add avcodec_encode_audio2() and deprecate avcodec_encode_audio().
|
||||
67f5650 / 5ee5fa0 Add avcodec_fill_audio_frame() as a convenience function.
|
||||
67f5650 / b2c75b6 Add avcodec_encode_audio2() and deprecate avcodec_encode_audio().
|
||||
Add AVCodec.encode2().
|
||||
|
||||
2012-01-12 - 3167dc9 - lavfi 2.15.0
|
||||
2012-01-12 - b18e17e / 3167dc9 - lavfi 2.59.100 / 2.15.0
|
||||
Add a new installed header -- libavfilter/version.h -- with version macros.
|
||||
|
||||
2011-12-08 - a502939 - lavfi 2.52.0
|
||||
@@ -311,37 +311,37 @@ API changes, most recent first:
|
||||
2011-10-20 - b35e9e1 - lavu 51.22.0
|
||||
Add av_strtok() to avstring.h.
|
||||
|
||||
2011-01-03 - b73ec05 - lavu 51.21.0
|
||||
2012-01-03 - ad1c8dd / b73ec05 - lavu 51.34.100 / 51.21.0
|
||||
Add av_popcount64
|
||||
|
||||
2011-12-18 - 8400b12 - lavc 53.28.1
|
||||
2011-12-18 - 7c29313 / 8400b12 - lavc 53.46.1 / 53.28.1
|
||||
Deprecate AVFrame.age. The field is unused.
|
||||
|
||||
2011-12-12 - 5266045 - lavf 53.17.0
|
||||
2011-12-12 - 8bc7fe4 / 5266045 - lavf 53.25.0 / 53.17.0
|
||||
Add avformat_close_input().
|
||||
Deprecate av_close_input_file() and av_close_input_stream().
|
||||
|
||||
2011-12-02 - 0eea212 - lavc 53.25.0
|
||||
2011-12-02 - e4de716 / 0eea212 - lavc 53.40.0 / 53.25.0
|
||||
Add nb_samples and extended_data fields to AVFrame.
|
||||
Deprecate AVCODEC_MAX_AUDIO_FRAME_SIZE.
|
||||
Deprecate avcodec_decode_audio3() in favor of avcodec_decode_audio4().
|
||||
avcodec_decode_audio4() writes output samples to an AVFrame, which allows
|
||||
audio decoders to use get_buffer().
|
||||
|
||||
2011-12-04 - 560f773 - lavc 53.24.0
|
||||
2011-12-04 - e4de716 / 560f773 - lavc 53.40.0 / 53.24.0
|
||||
Change AVFrame.data[4]/base[4]/linesize[4]/error[4] to [8] at next major bump.
|
||||
Change AVPicture.data[4]/linesize[4] to [8] at next major bump.
|
||||
Change AVCodecContext.error[4] to [8] at next major bump.
|
||||
Add AV_NUM_DATA_POINTERS to simplify the bump transition.
|
||||
|
||||
2011-11-23 - bbb46f3 - lavu 51.18.0
|
||||
2011-11-23 - 8e576d5 / bbb46f3 - lavu 51.27.0 / 51.18.0
|
||||
Add av_samples_get_buffer_size(), av_samples_fill_arrays(), and
|
||||
av_samples_alloc(), to samplefmt.h.
|
||||
|
||||
2011-11-23 - 8889cc4 - lavu 51.17.0
|
||||
2011-11-23 - 8e576d5 / 8889cc4 - lavu 51.27.0 / 51.17.0
|
||||
Add planar sample formats and av_sample_fmt_is_planar() to samplefmt.h.
|
||||
|
||||
2011-11-19 - f3a29b7 - lavc 53.21.0
|
||||
2011-11-19 - dbb38bc / f3a29b7 - lavc 53.36.0 / 53.21.0
|
||||
Move some AVCodecContext fields to a new private struct, AVCodecInternal,
|
||||
which is accessed from a new field, AVCodecContext.internal.
|
||||
- fields moved:
|
||||
@@ -349,55 +349,55 @@ API changes, most recent first:
|
||||
AVCodecContext.internal_buffer_count --> AVCodecInternal.buffer_count
|
||||
AVCodecContext.is_copy --> AVCodecInternal.is_copy
|
||||
|
||||
2011-11-16 - 6270671 - lavu 51.16.0
|
||||
2011-11-16 - 8709ba9 / 6270671 - lavu 51.26.0 / 51.16.0
|
||||
Add av_timegm()
|
||||
|
||||
2011-11-13 - lavf 53.15.0
|
||||
2011-11-13 - lavf 53.21.0 / 53.15.0
|
||||
New interrupt callback API, allowing per-AVFormatContext/AVIOContext
|
||||
interrupt callbacks.
|
||||
6aa0b98 Add AVIOInterruptCB struct and the interrupt_callback field to
|
||||
5f268ca / 6aa0b98 Add AVIOInterruptCB struct and the interrupt_callback field to
|
||||
AVFormatContext.
|
||||
1dee0ac Add avio_open2() with additional parameters. Those are
|
||||
5f268ca / 1dee0ac Add avio_open2() with additional parameters. Those are
|
||||
an interrupt callback and an options AVDictionary.
|
||||
This will allow passing AVOptions to protocols after lavf
|
||||
54.0.
|
||||
|
||||
2011-11-06 - ba04ecf - lavu 51.14.0
|
||||
2011-11-06 - 13b7781 / ba04ecf - lavu 51.24.0 / 51.14.0
|
||||
Add av_strcasecmp() and av_strncasecmp() to avstring.h.
|
||||
|
||||
2011-11-06 - 07b172f - lavu 51.13.0
|
||||
2011-11-06 - 13b7781 / 07b172f - lavu 51.24.0 / 51.13.0
|
||||
Add av_toupper()/av_tolower()
|
||||
|
||||
2011-11-05 - b6d08f4 - lavf 53.13.0
|
||||
2011-11-05 - d8cab5c / b6d08f4 - lavf 53.19.0 / 53.13.0
|
||||
Add avformat_network_init()/avformat_network_deinit()
|
||||
|
||||
2011-10-27 - 512557b - lavc 53.15.0
|
||||
2011-10-27 - 6faf0a2 / 512557b - lavc 53.24.0 / 53.15.0
|
||||
Remove avcodec_parse_frame.
|
||||
Deprecate AVCodecContext.parse_only and CODEC_CAP_PARSE_ONLY.
|
||||
|
||||
2011-10-19 - 569129a - lavf 53.10.0
|
||||
2011-10-19 - d049257 / 569129a - lavf 53.17.0 / 53.10.0
|
||||
Add avformat_new_stream(). Deprecate av_new_stream().
|
||||
|
||||
2011-10-13 - b631fba - lavf 53.9.0
|
||||
2011-10-13 - 91eb1b1 / b631fba - lavf 53.16.0 / 53.9.0
|
||||
Add AVFMT_NO_BYTE_SEEK AVInputFormat flag.
|
||||
|
||||
2011-10-12 - lavu 51.12.0
|
||||
2011-10-12 - lavu 51.21.0 / 51.12.0
|
||||
AVOptions API rewrite.
|
||||
|
||||
- 145f741 FF_OPT_TYPE* renamed to AV_OPT_TYPE_*
|
||||
- f884ef0 / 145f741 FF_OPT_TYPE* renamed to AV_OPT_TYPE_*
|
||||
- new setting/getting functions with slightly different semantics:
|
||||
dac66da av_set_string3 -> av_opt_set
|
||||
f884ef0 / dac66da av_set_string3 -> av_opt_set
|
||||
av_set_double -> av_opt_set_double
|
||||
av_set_q -> av_opt_set_q
|
||||
av_set_int -> av_opt_set_int
|
||||
|
||||
41d9d51 av_get_string -> av_opt_get
|
||||
f884ef0 / 41d9d51 av_get_string -> av_opt_get
|
||||
av_get_double -> av_opt_get_double
|
||||
av_get_q -> av_opt_get_q
|
||||
av_get_int -> av_opt_get_int
|
||||
|
||||
- 8c5dcaa trivial rename av_next_option -> av_opt_next
|
||||
- 641c7af new functions - av_opt_child_next, av_opt_child_class_next
|
||||
- f884ef0 / 8c5dcaa trivial rename av_next_option -> av_opt_next
|
||||
- f884ef0 / 641c7af new functions - av_opt_child_next, av_opt_child_class_next
|
||||
and av_opt_find2()
|
||||
|
||||
2011-09-22 - a70e787 - lavu 51.17.0
|
||||
@@ -443,31 +443,31 @@ API changes, most recent first:
|
||||
2011-08-20 - 69e2c1a - lavu 51.13.0
|
||||
Add av_get_media_type_string().
|
||||
|
||||
2011-09-03 - fb4ca26 - lavc 53.13.0
|
||||
2011-09-03 - 1889c67 / fb4ca26 - lavc 53.13.0
|
||||
lavf 53.11.0
|
||||
lsws 2.1.0
|
||||
Add {avcodec,avformat,sws}_get_class().
|
||||
|
||||
2011-08-03 - c11fb82 - lavu 51.15.0
|
||||
2011-08-03 - 1889c67 / c11fb82 - lavu 51.15.0
|
||||
Add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find() function.
|
||||
|
||||
2011-08-14 - 323b930 - lavu 51.12.0
|
||||
Add av_fifo_peek2(), deprecate av_fifo_peek().
|
||||
|
||||
2011-08-26 - lavu 51.9.0
|
||||
- add41de..abc78a5 Do not include intfloat_readwrite.h,
|
||||
2011-08-26 - lavu 51.14.0 / 51.9.0
|
||||
- 976a8b2 / add41de..976a8b2 / abc78a5 Do not include intfloat_readwrite.h,
|
||||
mathematics.h, rational.h, pixfmt.h, or log.h from avutil.h.
|
||||
|
||||
2011-08-16 - 48f9e45 - lavf 53.8.0
|
||||
2011-08-16 - 27fbe31 / 48f9e45 - lavf 53.11.0 / 53.8.0
|
||||
Add avformat_query_codec().
|
||||
|
||||
2011-08-16 - bca06e7 - lavc 53.11.0
|
||||
2011-08-16 - 27fbe31 / bca06e7 - lavc 53.11.0
|
||||
Add avcodec_get_type().
|
||||
|
||||
2011-08-06 - 2f63440 - lavf 53.7.0
|
||||
2011-08-06 - 0cb233c / 2f63440 - lavf 53.7.0
|
||||
Add error_recognition to AVFormatContext.
|
||||
|
||||
2011-08-02 - 9d39cbf - lavc 53.9.1
|
||||
2011-08-02 - 1d186e9 / 9d39cbf - lavc 53.9.1
|
||||
Add AV_PKT_FLAG_CORRUPT AVPacket flag.
|
||||
|
||||
2011-07-16 - b57df29 - lavfi 2.27.0
|
||||
@@ -478,11 +478,11 @@ API changes, most recent first:
|
||||
avfilter_set_common_packing_formats()
|
||||
avfilter_all_packing_formats()
|
||||
|
||||
2011-07-10 - a67c061 - lavf 53.6.0
|
||||
2011-07-10 - 3602ad7 / a67c061 - lavf 53.6.0
|
||||
Add avformat_find_stream_info(), deprecate av_find_stream_info().
|
||||
NOTE: this was backported to 0.7
|
||||
|
||||
2011-07-10 - 0b950fe - lavc 53.8.0
|
||||
2011-07-10 - 3602ad7 / 0b950fe - lavc 53.8.0
|
||||
Add avcodec_open2(), deprecate avcodec_open().
|
||||
NOTE: this was backported to 0.7
|
||||
|
||||
@@ -525,35 +525,35 @@ API changes, most recent first:
|
||||
2011-06-12 - 6119b23 - lavfi 2.16.0 - avfilter_graph_parse()
|
||||
Change avfilter_graph_parse() signature.
|
||||
|
||||
2011-06-23 - 67e9ae1 - lavu 51.8.0 - attributes.h
|
||||
2011-06-23 - 686959e / 67e9ae1 - lavu 51.10.0 / 51.8.0 - attributes.h
|
||||
Add av_printf_format().
|
||||
|
||||
2011-06-16 - 05e84c9, 25de595 - lavf 53.2.0 - avformat.h
|
||||
2011-06-16 - 2905e3f / 05e84c9, 2905e3f / 25de595 - lavf 53.4.0 / 53.2.0 - avformat.h
|
||||
Add avformat_open_input and avformat_write_header().
|
||||
Deprecate av_open_input_stream, av_open_input_file,
|
||||
AVFormatParameters and av_write_header.
|
||||
|
||||
2011-06-16 - 7e83e1c, dc59ec5 - lavu 51.7.0 - opt.h
|
||||
2011-06-16 - 2905e3f / 7e83e1c, 2905e3f / dc59ec5 - lavu 51.9.0 / 51.7.0 - opt.h
|
||||
Add av_opt_set_dict() and av_opt_find().
|
||||
Deprecate av_find_opt().
|
||||
Add AV_DICT_APPEND flag.
|
||||
|
||||
2011-06-10 - cb7c11c - lavu 51.6.0 - opt.h
|
||||
2011-06-10 - 45fb647 / cb7c11c - lavu 51.6.0 - opt.h
|
||||
Add av_opt_flag_is_set().
|
||||
|
||||
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
||||
Add avfilter_get_audio_buffer_ref_from_arrays() to avfilter.h.
|
||||
|
||||
2011-06-09 - d9f80ea - lavu 51.8.0 - AVMetadata
|
||||
2011-06-09 - f9ecb84 / d9f80ea - lavu 51.8.0 - AVMetadata
|
||||
Move AVMetadata from lavf to lavu and rename it to
|
||||
AVDictionary -- new installed header dict.h.
|
||||
All av_metadata_* functions renamed to av_dict_*.
|
||||
|
||||
2011-06-07 - a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||
2011-06-07 - d552f61 / a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||
Add av_get_bytes_per_sample() in libavutil/samplefmt.h.
|
||||
Deprecate av_get_bits_per_sample_fmt().
|
||||
|
||||
2011-06-05 - b39b062 - lavu 51.8.0 - opt.h
|
||||
2011-06-05 - f956924 / b39b062 - lavu 51.8.0 - opt.h
|
||||
Add av_opt_free convenience function.
|
||||
|
||||
2011-06-06 - 95a0242 - lavfi 2.14.0 - AVFilterBufferRefAudioProps
|
||||
@@ -583,7 +583,7 @@ API changes, most recent first:
|
||||
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
|
||||
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
|
||||
|
||||
2011-05-25 - 30315a8 - lavf 53.3.0 - avformat.h
|
||||
2011-05-25 - 39e4206 / 30315a8 - lavf 53.3.0 - avformat.h
|
||||
Add fps_probe_size to AVFormatContext.
|
||||
|
||||
2011-05-22 - 5ecdfd0 - lavf 53.2.0 - avformat.h
|
||||
@@ -599,10 +599,10 @@ API changes, most recent first:
|
||||
2011-05-14 - 9fdf772 - lavfi 2.6.0 - avcodec.h
|
||||
Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h.
|
||||
|
||||
2011-05-18 - 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||
2011-05-18 - 75a37b5 / 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||
Add request_sample_fmt field to AVCodecContext.
|
||||
|
||||
2011-05-10 - 188dea1 - lavc 53.6.0 - avcodec.h
|
||||
2011-05-10 - 59eb12f / 188dea1 - lavc 53.6.0 - avcodec.h
|
||||
Deprecate AVLPCType and the following fields in
|
||||
AVCodecContext: lpc_coeff_precision, prediction_order_method,
|
||||
min_partition_order, max_partition_order, lpc_type, lpc_passes.
|
||||
@@ -632,81 +632,81 @@ API changes, most recent first:
|
||||
Add av_dynarray_add function for adding
|
||||
an element to a dynamic array.
|
||||
|
||||
2011-04-26 - bebe72f - lavu 51.1.0 - avutil.h
|
||||
2011-04-26 - d7e5aeb / bebe72f - lavu 51.1.0 - avutil.h
|
||||
Add AVPictureType enum and av_get_picture_type_char(), deprecate
|
||||
FF_*_TYPE defines and av_get_pict_type_char() defined in
|
||||
libavcodec/avcodec.h.
|
||||
|
||||
2011-04-26 - 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||
2011-04-26 - d7e5aeb / 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||
Add pict_type and key_frame fields to AVFilterBufferRefVideo.
|
||||
|
||||
2011-04-26 - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||
2011-04-26 - d7e5aeb / 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||
Add sample_aspect_ratio fields to vsrc_buffer arguments
|
||||
|
||||
2011-04-21 - 94f7451 - lavc 53.1.0 - avcodec.h
|
||||
2011-04-21 - 8772156 / 94f7451 - lavc 53.1.0 - avcodec.h
|
||||
Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading.
|
||||
|
||||
2011-04-15 - lavc 52.120.0 - avcodec.h
|
||||
AVPacket structure got additional members for passing side information:
|
||||
4de339e introduce side information for AVPacket
|
||||
2d8591c make containers pass palette change in AVPacket
|
||||
c407984 / 4de339e introduce side information for AVPacket
|
||||
c407984 / 2d8591c make containers pass palette change in AVPacket
|
||||
|
||||
2011-04-12 - lavf 52.107.0 - avio.h
|
||||
Avio cleanup, part II - deprecate the entire URLContext API:
|
||||
175389c add avio_check as a replacement for url_exist
|
||||
ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||
c55780d / 175389c add avio_check as a replacement for url_exist
|
||||
9891004 / ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||
for _av_url_read_fseek/fpause
|
||||
cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||
d4d0932 / cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||
should be used instead.
|
||||
80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||
f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||
f8270bb add avio_enum_protocols.
|
||||
5593f03 deprecate URLProtocol.
|
||||
c486dad deprecate URLContext.
|
||||
026e175 deprecate the typedef for URLInterruptCB
|
||||
8e76a19 deprecate av_register_protocol2.
|
||||
b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||
1305d93 deprecate av_url_read_seek
|
||||
fa104e1 deprecate av_url_read_pause
|
||||
727c7aa deprecate url_get_filename().
|
||||
5958df3 deprecate url_max_packet_size().
|
||||
1869ea0 deprecate url_get_file_handle().
|
||||
32a97d4 deprecate url_filesize().
|
||||
e52a914 deprecate url_close().
|
||||
58a48c6 deprecate url_seek().
|
||||
925e908 deprecate url_write().
|
||||
dce3756 deprecate url_read_complete().
|
||||
bc371ac deprecate url_read().
|
||||
0589da0 deprecate url_open().
|
||||
62eaaea deprecate url_connect.
|
||||
5652bb9 deprecate url_alloc.
|
||||
333e894 deprecate url_open_protocol
|
||||
e230705 deprecate url_poll and URLPollEntry
|
||||
c88caa5 / 80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||
c88caa5 / f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||
d4d0932 / f8270bb add avio_enum_protocols.
|
||||
d4d0932 / 5593f03 deprecate URLProtocol.
|
||||
d4d0932 / c486dad deprecate URLContext.
|
||||
d4d0932 / 026e175 deprecate the typedef for URLInterruptCB
|
||||
c88caa5 / 8e76a19 deprecate av_register_protocol2.
|
||||
11d7841 / b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||
11d7841 / 1305d93 deprecate av_url_read_seek
|
||||
11d7841 / fa104e1 deprecate av_url_read_pause
|
||||
434f248 / 727c7aa deprecate url_get_filename().
|
||||
434f248 / 5958df3 deprecate url_max_packet_size().
|
||||
434f248 / 1869ea0 deprecate url_get_file_handle().
|
||||
434f248 / 32a97d4 deprecate url_filesize().
|
||||
434f248 / e52a914 deprecate url_close().
|
||||
434f248 / 58a48c6 deprecate url_seek().
|
||||
434f248 / 925e908 deprecate url_write().
|
||||
434f248 / dce3756 deprecate url_read_complete().
|
||||
434f248 / bc371ac deprecate url_read().
|
||||
434f248 / 0589da0 deprecate url_open().
|
||||
434f248 / 62eaaea deprecate url_connect.
|
||||
434f248 / 5652bb9 deprecate url_alloc.
|
||||
434f248 / 333e894 deprecate url_open_protocol
|
||||
434f248 / e230705 deprecate url_poll and URLPollEntry
|
||||
|
||||
2011-04-08 - lavf 52.106.0 - avformat.h
|
||||
Minor avformat.h cleanup:
|
||||
a9bf9d8 deprecate av_guess_image2_codec
|
||||
c3675df rename avf_sdp_create->av_sdp_create
|
||||
d4d0932 / a9bf9d8 deprecate av_guess_image2_codec
|
||||
d4d0932 / c3675df rename avf_sdp_create->av_sdp_create
|
||||
|
||||
2011-04-03 - lavf 52.105.0 - avio.h
|
||||
Large-scale renaming/deprecating of AVIOContext-related functions:
|
||||
724f6a0 deprecate url_fdopen
|
||||
403ee83 deprecate url_open_dyn_packet_buf
|
||||
6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||
b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||
8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||
2cae980 / 724f6a0 deprecate url_fdopen
|
||||
2cae980 / 403ee83 deprecate url_open_dyn_packet_buf
|
||||
2cae980 / 6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||
2cae980 / b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||
2cae980 / 8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||
AVIOContext.is_streamed and url_is_streamed()
|
||||
b64030f deprecate get_checksum()
|
||||
4c4427a deprecate init_checksum()
|
||||
4ec153b deprecate udp_set_remote_url/get_local_port
|
||||
933e90a deprecate av_url_read_fseek/fpause
|
||||
8d9769a deprecate url_fileno
|
||||
b7f2fdd rename put_flush_packet -> avio_flush
|
||||
35f1023 deprecate url_close_buf
|
||||
83fddae deprecate url_open_buf
|
||||
d9d86e0 rename url_fprintf -> avio_printf
|
||||
59f65d9 deprecate url_setbufsize
|
||||
3e68b3b deprecate url_ferror
|
||||
1caa412 / b64030f deprecate get_checksum()
|
||||
1caa412 / 4c4427a deprecate init_checksum()
|
||||
2fd41c9 / 4ec153b deprecate udp_set_remote_url/get_local_port
|
||||
4fa0e24 / 933e90a deprecate av_url_read_fseek/fpause
|
||||
4fa0e24 / 8d9769a deprecate url_fileno
|
||||
0fecf26 / b7f2fdd rename put_flush_packet -> avio_flush
|
||||
0fecf26 / 35f1023 deprecate url_close_buf
|
||||
0fecf26 / 83fddae deprecate url_open_buf
|
||||
0fecf26 / d9d86e0 rename url_fprintf -> avio_printf
|
||||
0fecf26 / 59f65d9 deprecate url_setbufsize
|
||||
6947b0c / 3e68b3b deprecate url_ferror
|
||||
e8bb2e2 deprecate url_fget_max_packet_size
|
||||
76aa876 rename url_fsize -> avio_size
|
||||
e519753 deprecate url_fgetc
|
||||
@@ -727,7 +727,7 @@ API changes, most recent first:
|
||||
b3db9ce deprecate get_partial_buffer
|
||||
8d9ac96 rename av_alloc_put_byte -> avio_alloc_context
|
||||
|
||||
2011-03-25 - 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||
2011-03-25 - 27ef7b1 / 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||
Add audio_service_type field to AVCodecContext.
|
||||
|
||||
2011-03-17 - e309fdc - lavu 50.40.0 - pixfmt.h
|
||||
@@ -765,11 +765,11 @@ API changes, most recent first:
|
||||
2011-02-10 - 12c14cd - lavf 52.99.0 - AVStream.disposition
|
||||
Add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED.
|
||||
|
||||
2011-02-09 - 5592734 - lavc 52.112.0 - avcodec_thread_init()
|
||||
2011-02-09 - c0b102c - lavc 52.112.0 - avcodec_thread_init()
|
||||
Deprecate avcodec_thread_init()/avcodec_thread_free() use; instead
|
||||
set thread_count before calling avcodec_open.
|
||||
|
||||
2011-02-09 - 778b08a - lavc 52.111.0 - threading API
|
||||
2011-02-09 - 37b00b4 - lavc 52.111.0 - threading API
|
||||
Add CODEC_CAP_FRAME_THREADS with new restrictions on get_buffer()/
|
||||
release_buffer()/draw_horiz_band() callbacks for appropriate codecs.
|
||||
Add thread_type and active_thread_type fields to AVCodecContext.
|
||||
|
@@ -1013,7 +1013,7 @@ ffmpeg -filter_complex 'color=red' -t 5 out.mkv
|
||||
|
||||
As a special exception, you can use a bitmap subtitle stream as input: it
|
||||
will be converted into a video with the same size as the largest video in
|
||||
the file, or 720×576 if no video is present. Note that this is an
|
||||
the file, or 720x576 if no video is present. Note that this is an
|
||||
experimental and temporary solution. It will be removed once libavfilter has
|
||||
proper support for subtitles.
|
||||
|
||||
|
@@ -3458,7 +3458,7 @@ Tile several successive frames together.
|
||||
It accepts as argument the tile size (i.e. the number of lines and columns)
|
||||
in the form "@var{w}x@var{h}".
|
||||
|
||||
For example, produce 8×8 PNG tiles of all keyframes (@option{-skip_frame
|
||||
For example, produce 8x8 PNG tiles of all keyframes (@option{-skip_frame
|
||||
nokey}) in a movie:
|
||||
@example
|
||||
ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
|
||||
@@ -4554,7 +4554,7 @@ streams in each segment. Default is 0.
|
||||
The filter has @var{v}+@var{a} outputs: first @var{v} video outputs, then
|
||||
@var{a} audio outputs.
|
||||
|
||||
There are @var{n}×(@var{v}+@var{a}) inputs: first the inputs for the first
|
||||
There are @var{n}x(@var{v}+@var{a}) inputs: first the inputs for the first
|
||||
segment, in the same order as the outputs, then the inputs for the second
|
||||
segment, etc.
|
||||
|
||||
|
@@ -641,10 +641,11 @@ Write an mp3 with an ID3v2.3 header and an ID3v1 footer:
|
||||
ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3
|
||||
@end example
|
||||
|
||||
Attach a picture to an mp3:
|
||||
To attach a picture to an mp3 file select both the audio and the picture stream
|
||||
with @code{map}:
|
||||
@example
|
||||
ffmpeg -i input.mp3 -i cover.png -c copy -metadata:s:v title="Album cover"
|
||||
-metadata:s:v comment="Cover (Front)" out.mp3
|
||||
ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1
|
||||
-metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3
|
||||
@end example
|
||||
|
||||
@c man end MUXERS
|
||||
|
@@ -1141,9 +1141,11 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
|
||||
if (do_pass) {
|
||||
if (do_pass & 1) {
|
||||
video_enc->flags |= CODEC_FLAG_PASS1;
|
||||
av_dict_set(&ost->opts, "flags", "+pass1", AV_DICT_APPEND);
|
||||
}
|
||||
if (do_pass & 2) {
|
||||
video_enc->flags |= CODEC_FLAG_PASS2;
|
||||
av_dict_set(&ost->opts, "flags", "+pass2", AV_DICT_APPEND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -112,6 +112,10 @@
|
||||
static VLC vlc_scalefactors;
|
||||
static VLC vlc_spectral[11];
|
||||
|
||||
static int output_configure(AACContext *ac,
|
||||
uint8_t layout_map[MAX_ELEM_ID*4][3], int tags,
|
||||
int channel_config, enum OCStatus oc_type);
|
||||
|
||||
#define overread_err "Input buffer exhausted before END element found\n"
|
||||
|
||||
static int count_channels(uint8_t (*layout)[3], int tags)
|
||||
@@ -373,6 +377,8 @@ static void pop_output_configuration(AACContext *ac) {
|
||||
ac->oc[1] = ac->oc[0];
|
||||
ac->avctx->channels = ac->oc[1].channels;
|
||||
ac->avctx->channel_layout = ac->oc[1].channel_layout;
|
||||
output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
|
||||
ac->oc[1].m4ac.chan_config, ac->oc[1].status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -883,6 +889,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (avctx->channels > MAX_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
AAC_INIT_VLC_STATIC( 0, 304);
|
||||
AAC_INIT_VLC_STATIC( 1, 270);
|
||||
AAC_INIT_VLC_STATIC( 2, 550);
|
||||
|
@@ -1124,7 +1124,12 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
||||
for (k = 0; k < sbr->n[sbr->data[0].bs_freq_res[e]]; k++) {
|
||||
float temp1 = exp2f(sbr->data[0].env_facs[e][k] * alpha + 7.0f);
|
||||
float temp2 = exp2f((pan_offset - sbr->data[1].env_facs[e][k]) * alpha);
|
||||
float fac = temp1 / (1.0f + temp2);
|
||||
float fac;
|
||||
if (temp1 > 1E20) {
|
||||
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||
temp1 = 1;
|
||||
}
|
||||
fac = temp1 / (1.0f + temp2);
|
||||
sbr->data[0].env_facs[e][k] = fac;
|
||||
sbr->data[1].env_facs[e][k] = fac * temp2;
|
||||
}
|
||||
@@ -1133,7 +1138,12 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
||||
for (k = 0; k < sbr->n_q; k++) {
|
||||
float temp1 = exp2f(NOISE_FLOOR_OFFSET - sbr->data[0].noise_facs[e][k] + 1);
|
||||
float temp2 = exp2f(12 - sbr->data[1].noise_facs[e][k]);
|
||||
float fac = temp1 / (1.0f + temp2);
|
||||
float fac;
|
||||
if (temp1 > 1E20) {
|
||||
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||
temp1 = 1;
|
||||
}
|
||||
fac = temp1 / (1.0f + temp2);
|
||||
sbr->data[0].noise_facs[e][k] = fac;
|
||||
sbr->data[1].noise_facs[e][k] = fac * temp2;
|
||||
}
|
||||
@@ -1142,9 +1152,15 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
||||
for (ch = 0; ch < (id_aac == TYPE_CPE) + 1; ch++) {
|
||||
float alpha = sbr->data[ch].bs_amp_res ? 1.0f : 0.5f;
|
||||
for (e = 1; e <= sbr->data[ch].bs_num_env; e++)
|
||||
for (k = 0; k < sbr->n[sbr->data[ch].bs_freq_res[e]]; k++)
|
||||
for (k = 0; k < sbr->n[sbr->data[ch].bs_freq_res[e]]; k++){
|
||||
sbr->data[ch].env_facs[e][k] =
|
||||
exp2f(alpha * sbr->data[ch].env_facs[e][k] + 6.0f);
|
||||
if (sbr->data[ch].env_facs[e][k] > 1E20) {
|
||||
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||
sbr->data[ch].env_facs[e][k] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (e = 1; e <= sbr->data[ch].bs_num_noise; e++)
|
||||
for (k = 0; k < sbr->n_q; k++)
|
||||
sbr->data[ch].noise_facs[e][k] =
|
||||
|
@@ -755,7 +755,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
for (n = nb_samples >> (1 - st); n > 0; n--) {
|
||||
for (n = (nb_samples - 1) >> (1 - st); n > 0; n--) {
|
||||
int v = bytestream2_get_byteu(&gb);
|
||||
*samples++ = adpcm_ima_expand_nibble(&c->status[0 ], v >> 4 , 3);
|
||||
*samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
|
||||
|
@@ -552,12 +552,15 @@ static void get_block_sizes(ALSDecContext *ctx, unsigned int *div_blocks,
|
||||
|
||||
/** Read the block data for a constant block
|
||||
*/
|
||||
static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
|
||||
static int read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
|
||||
{
|
||||
ALSSpecificConfig *sconf = &ctx->sconf;
|
||||
AVCodecContext *avctx = ctx->avctx;
|
||||
GetBitContext *gb = &ctx->gb;
|
||||
|
||||
if (bd->block_length <= 0)
|
||||
return -1;
|
||||
|
||||
*bd->raw_samples = 0;
|
||||
*bd->const_block = get_bits1(gb); // 1 = constant value, 0 = zero block (silence)
|
||||
bd->js_blocks = get_bits1(gb);
|
||||
@@ -572,6 +575,8 @@ static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
|
||||
|
||||
// ensure constant block decoding by reusing this field
|
||||
*bd->const_block = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -971,7 +976,8 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
|
||||
if (read_var_block_data(ctx, bd))
|
||||
return -1;
|
||||
} else {
|
||||
read_const_block_data(ctx, bd);
|
||||
if (read_const_block_data(ctx, bd) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@@ -955,6 +955,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
/* Check the extradata. */
|
||||
|
||||
if (q->codingMode == JOINT_STEREO && avctx->channels < 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (q->atrac3version != 4) {
|
||||
av_log(avctx,AV_LOG_ERROR,"Version %d != 4.\n",q->atrac3version);
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
@@ -169,7 +169,7 @@ static void init_lengths(BinkContext *c, int width, int bw)
|
||||
*
|
||||
* @param c decoder context
|
||||
*/
|
||||
static av_cold void init_bundles(BinkContext *c)
|
||||
static av_cold int init_bundles(BinkContext *c)
|
||||
{
|
||||
int bw, bh, blocks;
|
||||
int i;
|
||||
@@ -180,8 +180,12 @@ static av_cold void init_bundles(BinkContext *c)
|
||||
|
||||
for (i = 0; i < BINKB_NB_SRC; i++) {
|
||||
c->bundle[i].data = av_malloc(blocks * 64);
|
||||
if (!c->bundle[i].data)
|
||||
return AVERROR(ENOMEM);
|
||||
c->bundle[i].data_end = c->bundle[i].data + blocks * 64;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1272,7 +1276,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
BinkContext * const c = avctx->priv_data;
|
||||
static VLC_TYPE table[16 * 128][2];
|
||||
static int binkb_initialised = 0;
|
||||
int i;
|
||||
int i, ret;
|
||||
int flags;
|
||||
|
||||
c->version = avctx->codec_tag >> 24;
|
||||
@@ -1307,7 +1311,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
ff_dsputil_init(&c->dsp, avctx);
|
||||
ff_binkdsp_init(&c->bdsp);
|
||||
|
||||
init_bundles(c);
|
||||
if ((ret = init_bundles(c)) < 0) {
|
||||
free_bundles(c);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (c->version == 'b') {
|
||||
if (!binkb_initialised) {
|
||||
|
@@ -295,7 +295,9 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
||||
inst = bytestream_get_byte(&buf);
|
||||
inst &= CDG_MASK;
|
||||
buf += 2; /// skipping 2 unneeded bytes
|
||||
bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
|
||||
|
||||
if (buf_size > CDG_HEADER_SIZE)
|
||||
bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
|
||||
|
||||
if ((command & CDG_MASK) == CDG_COMMAND) {
|
||||
switch (inst) {
|
||||
|
@@ -201,6 +201,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
buf[803] = s->bits_per_component;
|
||||
write16(buf + 804, (s->bits_per_component == 10 || s->bits_per_component == 12) ?
|
||||
1 : 0); /* packing method */
|
||||
write32(buf + 808, HEADER_SIZE); /* data offset */
|
||||
|
||||
/* Image source information header */
|
||||
write32(buf + 1628, avctx->sample_aspect_ratio.num);
|
||||
|
@@ -923,6 +923,12 @@ void ff_er_frame_end(MpegEncContext *s)
|
||||
return;
|
||||
};
|
||||
|
||||
if ( s->picture_structure == PICT_FRAME
|
||||
&& s->current_picture.f.linesize[0] != s->current_picture_ptr->f.linesize[0]) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (s->current_picture.f.motion_val[0] == NULL) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
|
||||
|
||||
|
@@ -27,7 +27,7 @@ const int ff_flac_sample_rate_table[16] =
|
||||
8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
|
||||
0, 0, 0, 0 };
|
||||
|
||||
const int16_t ff_flac_blocksize_table[16] = {
|
||||
const int32_t ff_flac_blocksize_table[16] = {
|
||||
0, 192, 576<<0, 576<<1, 576<<2, 576<<3, 0, 0,
|
||||
256<<0, 256<<1, 256<<2, 256<<3, 256<<4, 256<<5, 256<<6, 256<<7
|
||||
};
|
||||
|
@@ -26,6 +26,6 @@
|
||||
|
||||
extern const int ff_flac_sample_rate_table[16];
|
||||
|
||||
extern const int16_t ff_flac_blocksize_table[16];
|
||||
extern const int32_t ff_flac_blocksize_table[16];
|
||||
|
||||
#endif /* AVCODEC_FLACDATA_H */
|
||||
|
@@ -1466,7 +1466,13 @@ static void decode_postinit(H264Context *h, int setup_finished)
|
||||
if( cur->f.pict_type == AV_PICTURE_TYPE_B
|
||||
|| (h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > INT_MIN && h->last_pocs[MAX_DELAYED_PIC_COUNT-1] - h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > 2))
|
||||
out_of_order = FFMAX(out_of_order, 1);
|
||||
if(s->avctx->has_b_frames < out_of_order && !h->sps.bitstream_restriction_flag){
|
||||
if (out_of_order == MAX_DELAYED_PIC_COUNT) {
|
||||
av_log(s->avctx, AV_LOG_VERBOSE, "Invalid POC %d<%d\n", cur->poc, h->last_pocs[0]);
|
||||
for (i = 1; i < MAX_DELAYED_PIC_COUNT; i++)
|
||||
h->last_pocs[i] = INT_MIN;
|
||||
h->last_pocs[0] = cur->poc;
|
||||
cur->mmco_reset = 1;
|
||||
} else if(s->avctx->has_b_frames < out_of_order && !h->sps.bitstream_restriction_flag){
|
||||
av_log(s->avctx, AV_LOG_VERBOSE, "Increasing reorder buffer to %d\n", out_of_order);
|
||||
s->avctx->has_b_frames = out_of_order;
|
||||
s->low_delay = 0;
|
||||
@@ -2280,7 +2286,7 @@ static int field_end(H264Context *h, int in_setup)
|
||||
* past end by one (callers fault) and resync_mb_y != 0
|
||||
* causes problems for the first MB line, too.
|
||||
*/
|
||||
if (!FIELD_PICTURE)
|
||||
if (!FIELD_PICTURE && h->current_slice)
|
||||
ff_er_frame_end(s);
|
||||
|
||||
ff_MPV_frame_end(s);
|
||||
@@ -2788,6 +2794,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
Picture *prev = h->short_ref_count ? h->short_ref[0] : NULL;
|
||||
av_log(h->s.avctx, AV_LOG_DEBUG, "Frame num gap %d %d\n",
|
||||
h->frame_num, h->prev_frame_num);
|
||||
if (!h->sps.gaps_in_frame_num_allowed_flag)
|
||||
for(i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++)
|
||||
h->last_pocs[i] = INT_MIN;
|
||||
if (ff_h264_frame_start(h) < 0)
|
||||
return -1;
|
||||
h->prev_frame_num++;
|
||||
|
@@ -367,7 +367,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
if(sps->profile_idc == 100 || sps->profile_idc == 110 ||
|
||||
sps->profile_idc == 122 || sps->profile_idc == 244 || sps->profile_idc == 44 ||
|
||||
sps->profile_idc == 83 || sps->profile_idc == 86 || sps->profile_idc == 118 ||
|
||||
sps->profile_idc == 128 ) {
|
||||
sps->profile_idc == 128 || sps->profile_idc == 144) {
|
||||
sps->chroma_format_idc= get_ue_golomb_31(&s->gb);
|
||||
if (sps->chroma_format_idc > 3U) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "chroma_format_idc %d is illegal\n", sps->chroma_format_idc);
|
||||
@@ -381,7 +381,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
}
|
||||
sps->bit_depth_luma = get_ue_golomb(&s->gb) + 8;
|
||||
sps->bit_depth_chroma = get_ue_golomb(&s->gb) + 8;
|
||||
if (sps->bit_depth_luma > 14U || sps->bit_depth_chroma > 14U) {
|
||||
if (sps->bit_depth_luma > 14U || sps->bit_depth_chroma > 14U || sps->bit_depth_luma != sps->bit_depth_chroma) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "illegal bit depth value (%d, %d)\n",
|
||||
sps->bit_depth_luma, sps->bit_depth_chroma);
|
||||
goto fail;
|
||||
|
@@ -287,7 +287,10 @@ int ff_h264_decode_ref_pic_list_reordering(H264Context *h){
|
||||
for(list=0; list<h->list_count; list++){
|
||||
for(index= 0; index < h->ref_count[list]; index++){
|
||||
if (!h->ref_list[list][index].f.data[0]) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Missing reference picture\n");
|
||||
int i;
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Missing reference picture, default is %d\n", h->default_ref_list[list][0].poc);
|
||||
for (i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++)
|
||||
h->last_pocs[i] = INT_MIN;
|
||||
if (h->default_ref_list[list][0].f.data[0])
|
||||
h->ref_list[list][index]= h->default_ref_list[list][0];
|
||||
else
|
||||
|
@@ -267,12 +267,13 @@ static void generate_joint_tables(HYuvContext *s)
|
||||
for (i = y = 0; y < 256; y++) {
|
||||
int len0 = s->len[0][y];
|
||||
int limit = VLC_BITS - len0;
|
||||
if(limit <= 0)
|
||||
if(limit <= 0 || !len0)
|
||||
continue;
|
||||
for (u = 0; u < 256; u++) {
|
||||
int len1 = s->len[p][u];
|
||||
if (len1 > limit)
|
||||
if (len1 > limit || !len1)
|
||||
continue;
|
||||
av_assert0(i < (1 << VLC_BITS));
|
||||
len[i] = len0 + len1;
|
||||
bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
|
||||
symbols[i] = (y << 8) + u;
|
||||
@@ -295,18 +296,19 @@ static void generate_joint_tables(HYuvContext *s)
|
||||
for (i = 0, g = -16; g < 16; g++) {
|
||||
int len0 = s->len[p0][g & 255];
|
||||
int limit0 = VLC_BITS - len0;
|
||||
if (limit0 < 2)
|
||||
if (limit0 < 2 || !len0)
|
||||
continue;
|
||||
for (b = -16; b < 16; b++) {
|
||||
int len1 = s->len[p1][b & 255];
|
||||
int limit1 = limit0 - len1;
|
||||
if (limit1 < 1)
|
||||
if (limit1 < 1 || !len1)
|
||||
continue;
|
||||
code = (s->bits[p0][g & 255] << len1) + s->bits[p1][b & 255];
|
||||
for (r = -16; r < 16; r++) {
|
||||
int len2 = s->len[2][r & 255];
|
||||
if (len2 > limit1)
|
||||
if (len2 > limit1 || !len2)
|
||||
continue;
|
||||
av_assert0(i < (1 << VLC_BITS));
|
||||
len[i] = len0 + len1 + len2;
|
||||
bits[i] = (code << len2) + s->bits[2][r & 255];
|
||||
if (s->decorrelate) {
|
||||
@@ -331,6 +333,7 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)
|
||||
{
|
||||
GetBitContext gb;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
init_get_bits(&gb, src, length * 8);
|
||||
|
||||
@@ -341,8 +344,9 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length)
|
||||
return -1;
|
||||
}
|
||||
ff_free_vlc(&s->vlc[i]);
|
||||
init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
|
||||
s->bits[i], 4, 4, 0);
|
||||
if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
|
||||
s->bits[i], 4, 4, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
generate_joint_tables(s);
|
||||
@@ -354,6 +358,7 @@ static int read_old_huffman_tables(HYuvContext *s)
|
||||
{
|
||||
GetBitContext gb;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
init_get_bits(&gb, classic_shift_luma,
|
||||
classic_shift_luma_table_size * 8);
|
||||
@@ -377,8 +382,9 @@ static int read_old_huffman_tables(HYuvContext *s)
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
ff_free_vlc(&s->vlc[i]);
|
||||
init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
|
||||
s->bits[i], 4, 4, 0);
|
||||
if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
|
||||
s->bits[i], 4, 4, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
generate_joint_tables(s);
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "libavutil/pixdesc.h"
|
||||
#include "avcodec.h"
|
||||
#include "bytestream.h"
|
||||
#include "lcl.h"
|
||||
@@ -484,6 +485,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
unsigned int basesize = avctx->width * avctx->height;
|
||||
unsigned int max_basesize = FFALIGN(avctx->width, 4) * FFALIGN(avctx->height, 4) + AV_LZO_OUTPUT_PADDING;
|
||||
unsigned int max_decomp_size;
|
||||
int subsample_h, subsample_v;
|
||||
|
||||
avcodec_get_frame_defaults(&c->pic);
|
||||
if (avctx->extradata_size < 8) {
|
||||
@@ -510,6 +512,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
max_decomp_size = max_basesize * 2;
|
||||
avctx->pix_fmt = PIX_FMT_YUV422P;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n");
|
||||
if (avctx->width % 4) {
|
||||
av_log_ask_for_sample(avctx, "Unsupported dimensions\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
break;
|
||||
case IMGTYPE_RGB24:
|
||||
c->decomp_size = basesize * 3;
|
||||
@@ -540,6 +546,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &subsample_h, &subsample_v);
|
||||
if (avctx->width % (1<<subsample_h) || avctx->height % (1<<subsample_v)) {
|
||||
av_log_ask_for_sample(avctx, "Unsupported dimensions\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* Detect compression method */
|
||||
c->compression = (int8_t)avctx->extradata[5];
|
||||
switch (avctx->codec_id) {
|
||||
|
@@ -174,7 +174,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
|
||||
frame->pict_type == AV_PICTURE_TYPE_P ? X264_TYPE_P :
|
||||
frame->pict_type == AV_PICTURE_TYPE_B ? X264_TYPE_B :
|
||||
X264_TYPE_AUTO;
|
||||
if (x4->params.b_tff != frame->top_field_first) {
|
||||
if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) {
|
||||
x4->params.b_tff = frame->top_field_first;
|
||||
x264_encoder_reconfig(x4->enc, &x4->params);
|
||||
}
|
||||
|
@@ -1602,6 +1602,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
MJpegDecodeContext *s = avctx->priv_data;
|
||||
const uint8_t *buf_end, *buf_ptr;
|
||||
const uint8_t *unescaped_buf_ptr;
|
||||
int hshift, vshift;
|
||||
int unescaped_buf_size;
|
||||
int start_code;
|
||||
int i, index;
|
||||
@@ -1779,6 +1780,9 @@ the_end:
|
||||
}
|
||||
if (s->upscale_v) {
|
||||
uint8_t *dst = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[(s->height - 1) * s->linesize[s->upscale_v]];
|
||||
int w;
|
||||
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift);
|
||||
w = s->width >> hshift;
|
||||
av_assert0(avctx->pix_fmt == PIX_FMT_YUVJ444P ||
|
||||
avctx->pix_fmt == PIX_FMT_YUV444P ||
|
||||
avctx->pix_fmt == PIX_FMT_YUVJ422P ||
|
||||
@@ -1787,16 +1791,16 @@ the_end:
|
||||
uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[i / 2 * s->linesize[s->upscale_v]];
|
||||
uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[(i + 1) / 2 * s->linesize[s->upscale_v]];
|
||||
if (src1 == src2) {
|
||||
memcpy(dst, src1, s->width);
|
||||
memcpy(dst, src1, w);
|
||||
} else {
|
||||
for (index = 0; index < s->width; index++)
|
||||
for (index = 0; index < w; index++)
|
||||
dst[index] = (src1[index] + src2[index]) >> 1;
|
||||
}
|
||||
dst -= s->linesize[s->upscale_v];
|
||||
}
|
||||
}
|
||||
if (s->flipped && (s->avctx->flags & CODEC_FLAG_EMU_EDGE)) {
|
||||
int hshift, vshift, j;
|
||||
int j;
|
||||
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift);
|
||||
for (index=0; index<4; index++) {
|
||||
uint8_t *dst = s->picture_ptr->data[index];
|
||||
|
@@ -104,6 +104,9 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
|
||||
if (half_horiz)
|
||||
run_length *=2;
|
||||
|
||||
if (run_length > s->avctx->width - x)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (color) {
|
||||
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
|
||||
if (half_vert)
|
||||
@@ -151,6 +154,8 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert)
|
||||
int replace_array = bytestream2_get_byte(&s->gb);
|
||||
for(j=0; j<8; j++) {
|
||||
int replace = (replace_array >> (7-j)) & 1;
|
||||
if (x + half_horiz >= s->avctx->width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (replace) {
|
||||
int color = bytestream2_get_byte(&data_ptr);
|
||||
s->frame.data[0][y*s->frame.linesize[0] + x] = color;
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "avcodec.h"
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/avstring.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "ass_split.h"
|
||||
@@ -87,15 +88,18 @@ static av_cold int mov_text_encode_init(AVCodecContext *avctx)
|
||||
static void mov_text_text_cb(void *priv, const char *text, int len)
|
||||
{
|
||||
MovTextContext *s = priv;
|
||||
av_assert0(s->end >= s->ptr);
|
||||
av_strlcpy(s->ptr, text, FFMIN(s->end - s->ptr, len + 1));
|
||||
s->ptr += len;
|
||||
s->ptr += FFMIN(s->end - s->ptr, len);
|
||||
}
|
||||
|
||||
static void mov_text_new_line_cb(void *priv, int forced)
|
||||
{
|
||||
MovTextContext *s = priv;
|
||||
av_assert0(s->end >= s->ptr);
|
||||
av_strlcpy(s->ptr, "\n", FFMIN(s->end - s->ptr, 2));
|
||||
s->ptr++;
|
||||
if (s->end > s->ptr)
|
||||
s->ptr++;
|
||||
}
|
||||
|
||||
static const ASSCodesCallbacks mov_text_callbacks = {
|
||||
|
@@ -30,6 +30,7 @@ typedef struct MpegAudioParseContext {
|
||||
int frame_size;
|
||||
uint32_t header;
|
||||
int header_count;
|
||||
int no_bitrate;
|
||||
} MpegAudioParseContext;
|
||||
|
||||
#define MPA_HEADER_SIZE 4
|
||||
@@ -74,15 +75,18 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
||||
if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header)
|
||||
s->header_count= -3;
|
||||
s->header= state;
|
||||
s->header_count++;
|
||||
s->frame_size = ret-4;
|
||||
|
||||
if (s->header_count > 1) {
|
||||
if (s->header_count > 0) {
|
||||
avctx->sample_rate= sr;
|
||||
avctx->channels = channels;
|
||||
s1->duration = frame_size;
|
||||
avctx->bit_rate = bit_rate;
|
||||
if (s->no_bitrate || !avctx->bit_rate) {
|
||||
s->no_bitrate = 1;
|
||||
avctx->bit_rate += (bit_rate - avctx->bit_rate) / s->header_count;
|
||||
}
|
||||
}
|
||||
s->header_count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -2085,7 +2085,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
|
||||
ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x;
|
||||
ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
|
||||
|
||||
if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) ||
|
||||
if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || uvsrc_y<0 ||
|
||||
(unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - h, 0)) {
|
||||
s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y,
|
||||
s->linesize, 17, 17 + field_based,
|
||||
@@ -2125,11 +2125,12 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
|
||||
pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
|
||||
|
||||
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
|
||||
int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
|
||||
uvsx = (uvsx << 2) >> lowres;
|
||||
uvsy = (uvsy << 2) >> lowres;
|
||||
if (h >> s->chroma_y_shift) {
|
||||
pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
|
||||
pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
|
||||
if (hc) {
|
||||
pix_op[op_index](dest_cb, ptr_cb, uvlinesize, hc, uvsx, uvsy);
|
||||
pix_op[op_index](dest_cr, ptr_cr, uvlinesize, hc, uvsx, uvsy);
|
||||
}
|
||||
}
|
||||
// FIXME h261 lowres loop filter
|
||||
|
@@ -138,7 +138,8 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
||||
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
|
||||
|
||||
output = pic->data[0] + (avctx->height - 1) * pic->linesize[0];
|
||||
output_end = pic->data[0] + avctx->height * pic->linesize[0];
|
||||
output_end = output + FFABS(pic->linesize[0]);
|
||||
|
||||
while (bytestream2_get_bytes_left(gb) > 0) {
|
||||
p1 = bytestream2_get_byteu(gb);
|
||||
if(p1 == 0) { //Escape code
|
||||
@@ -155,6 +156,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
output_end = output + FFABS(pic->linesize[0]);
|
||||
pos = 0;
|
||||
continue;
|
||||
} else if(p2 == 1) { //End-of-picture
|
||||
@@ -169,11 +171,11 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
||||
return -1;
|
||||
}
|
||||
output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3);
|
||||
output_end = pic->data[0] + line * pic->linesize[0] + FFABS(pic->linesize[0]);
|
||||
continue;
|
||||
}
|
||||
// Copy data
|
||||
if ((pic->linesize[0] > 0 && output + p2 * (depth >> 3) > output_end) ||
|
||||
(pic->linesize[0] < 0 && output + p2 * (depth >> 3) < output_end)) {
|
||||
if (output + p2 * (depth >> 3) > output_end) {
|
||||
bytestream2_skip(gb, 2 * (depth >> 3));
|
||||
continue;
|
||||
} else if (bytestream2_get_bytes_left(gb) < p2 * (depth >> 3)) {
|
||||
@@ -203,36 +205,39 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
||||
pos += p2;
|
||||
} else { //run of pixels
|
||||
uint8_t pix[3]; //original pixel
|
||||
switch(depth){
|
||||
case 8: pix[0] = bytestream2_get_byte(gb);
|
||||
break;
|
||||
case 16: pix16 = bytestream2_get_le16(gb);
|
||||
break;
|
||||
case 24: pix[0] = bytestream2_get_byte(gb);
|
||||
pix[1] = bytestream2_get_byte(gb);
|
||||
pix[2] = bytestream2_get_byte(gb);
|
||||
break;
|
||||
case 32: pix32 = bytestream2_get_le32(gb);
|
||||
break;
|
||||
}
|
||||
if ((pic->linesize[0] > 0 && output + p1 * (depth >> 3) > output_end) ||
|
||||
(pic->linesize[0] < 0 && output + p1 * (depth >> 3) < output_end))
|
||||
if (output + p1 * (depth >> 3) > output_end)
|
||||
continue;
|
||||
for(i = 0; i < p1; i++) {
|
||||
switch(depth){
|
||||
case 8: *output++ = pix[0];
|
||||
break;
|
||||
case 16: *(uint16_t*)output = pix16;
|
||||
output += 2;
|
||||
break;
|
||||
case 24: *output++ = pix[0];
|
||||
*output++ = pix[1];
|
||||
*output++ = pix[2];
|
||||
break;
|
||||
case 32: *(uint32_t*)output = pix32;
|
||||
output += 4;
|
||||
break;
|
||||
|
||||
switch(depth){
|
||||
case 8:
|
||||
pix[0] = bytestream2_get_byte(gb);
|
||||
for(i = 0; i < p1; i++)
|
||||
*output++ = pix[0];
|
||||
break;
|
||||
case 16:
|
||||
pix16 = bytestream2_get_le16(gb);
|
||||
for(i = 0; i < p1; i++) {
|
||||
*(uint16_t*)output = pix16;
|
||||
output += 2;
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
pix[0] = bytestream2_get_byte(gb);
|
||||
pix[1] = bytestream2_get_byte(gb);
|
||||
pix[2] = bytestream2_get_byte(gb);
|
||||
for(i = 0; i < p1; i++) {
|
||||
*output++ = pix[0];
|
||||
*output++ = pix[1];
|
||||
*output++ = pix[2];
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
pix32 = bytestream2_get_le32(gb);
|
||||
for(i = 0; i < p1; i++) {
|
||||
*(uint32_t*)output = pix32;
|
||||
output += 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
pos += p1;
|
||||
}
|
||||
|
@@ -187,7 +187,7 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
|
||||
if(bpp >= 2) g = dst[1];\
|
||||
if(bpp >= 3) b = dst[2];\
|
||||
if(bpp >= 4) a = dst[3];\
|
||||
for(; i < size; i+=bpp) {\
|
||||
for(; i <= size - bpp; i+=bpp) {\
|
||||
dst[i+0] = r = op(r, src[i+0], last[i+0]);\
|
||||
if(bpp == 1) continue;\
|
||||
dst[i+1] = g = op(g, src[i+1], last[i+1]);\
|
||||
@@ -203,13 +203,9 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
|
||||
else if(bpp == 2) UNROLL1(2, op)\
|
||||
else if(bpp == 3) UNROLL1(3, op)\
|
||||
else if(bpp == 4) UNROLL1(4, op)\
|
||||
else {\
|
||||
for (; i < size; i += bpp) {\
|
||||
int j;\
|
||||
for (j = 0; j < bpp; j++)\
|
||||
dst[i+j] = op(dst[i+j-bpp], src[i+j], last[i+j]);\
|
||||
}\
|
||||
}
|
||||
for (; i < size; i++) {\
|
||||
dst[i] = op(dst[i-bpp], src[i], last[i]);\
|
||||
}\
|
||||
|
||||
/* NOTE: 'dst' can be equal to 'last' */
|
||||
static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
|
||||
|
@@ -244,12 +244,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
color_type = PNG_COLOR_TYPE_RGB;
|
||||
break;
|
||||
case PIX_FMT_RGBA:
|
||||
avctx->bits_per_coded_sample = 32;
|
||||
bit_depth = 8;
|
||||
color_type = PNG_COLOR_TYPE_RGB_ALPHA;
|
||||
break;
|
||||
case PIX_FMT_RGB24:
|
||||
avctx->bits_per_coded_sample = 24;
|
||||
bit_depth = 8;
|
||||
color_type = PNG_COLOR_TYPE_RGB;
|
||||
break;
|
||||
@@ -258,7 +256,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
color_type = PNG_COLOR_TYPE_GRAY;
|
||||
break;
|
||||
case PIX_FMT_GRAY8:
|
||||
avctx->bits_per_coded_sample = 0x28;
|
||||
bit_depth = 8;
|
||||
color_type = PNG_COLOR_TYPE_GRAY;
|
||||
break;
|
||||
@@ -267,12 +264,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
|
||||
break;
|
||||
case PIX_FMT_MONOBLACK:
|
||||
avctx->bits_per_coded_sample =
|
||||
bit_depth = 1;
|
||||
color_type = PNG_COLOR_TYPE_GRAY;
|
||||
break;
|
||||
case PIX_FMT_PAL8:
|
||||
avctx->bits_per_coded_sample =
|
||||
bit_depth = 8;
|
||||
color_type = PNG_COLOR_TYPE_PALETTE;
|
||||
break;
|
||||
@@ -432,6 +427,23 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
static av_cold int png_enc_init(AVCodecContext *avctx){
|
||||
PNGEncContext *s = avctx->priv_data;
|
||||
|
||||
switch(avctx->pix_fmt) {
|
||||
case PIX_FMT_RGBA:
|
||||
avctx->bits_per_coded_sample = 32;
|
||||
break;
|
||||
case PIX_FMT_RGB24:
|
||||
avctx->bits_per_coded_sample = 24;
|
||||
break;
|
||||
case PIX_FMT_GRAY8:
|
||||
avctx->bits_per_coded_sample = 0x28;
|
||||
break;
|
||||
case PIX_FMT_MONOBLACK:
|
||||
avctx->bits_per_coded_sample = 1;
|
||||
break;
|
||||
case PIX_FMT_PAL8:
|
||||
avctx->bits_per_coded_sample = 8;
|
||||
}
|
||||
|
||||
avcodec_get_frame_defaults(&s->picture);
|
||||
avctx->coded_frame= &s->picture;
|
||||
ff_dsputil_init(&s->dsp, avctx);
|
||||
|
@@ -106,7 +106,7 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av
|
||||
if (!cutoff_coeff && avctx->codec_id == AV_CODEC_ID_AAC)
|
||||
cutoff_coeff = 2.0 * AAC_CUTOFF(avctx) / avctx->sample_rate;
|
||||
|
||||
if (cutoff_coeff)
|
||||
if (cutoff_coeff && cutoff_coeff < 0.98)
|
||||
ctx->fcoeffs = ff_iir_filter_init_coeffs(avctx, FF_FILTER_TYPE_BUTTERWORTH,
|
||||
FF_FILTER_MODE_LOWPASS, FILT_ORDER,
|
||||
cutoff_coeff, 0.0, 0.0);
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "avcodec.h"
|
||||
#include "bytestream.h"
|
||||
#include "libavutil/bswap.h"
|
||||
#include "libavutil/imgutils.h"
|
||||
#include "libavcodec/dsputil.h"
|
||||
#include "sanm_data.h"
|
||||
|
||||
@@ -414,6 +415,11 @@ static int old_codec37(SANMVideoContext *ctx, int top,
|
||||
flags = bytestream2_get_byte(&ctx->gb);
|
||||
bytestream2_skip(&ctx->gb, 3);
|
||||
|
||||
if (decoded_size > ctx->height * stride - left - top * stride) {
|
||||
decoded_size = ctx->height * stride - left - top * stride;
|
||||
av_log(ctx->avctx, AV_LOG_WARNING, "decoded size is too large\n");
|
||||
}
|
||||
|
||||
ctx->rotate_code = 0;
|
||||
|
||||
if (((seq & 1) || !(flags & 1)) && (compr && compr != 2))
|
||||
@@ -637,6 +643,11 @@ static int old_codec47(SANMVideoContext *ctx, int top,
|
||||
decoded_size = bytestream2_get_le32(&ctx->gb);
|
||||
bytestream2_skip(&ctx->gb, 8);
|
||||
|
||||
if (decoded_size > ctx->height * stride - left - top * stride) {
|
||||
decoded_size = ctx->height * stride - left - top * stride;
|
||||
av_log(ctx->avctx, AV_LOG_WARNING, "decoded size is too large\n");
|
||||
}
|
||||
|
||||
if (skip & 1)
|
||||
bytestream2_skip(&ctx->gb, 0x8080);
|
||||
if (!seq) {
|
||||
@@ -714,9 +725,17 @@ static int process_frame_obj(SANMVideoContext *ctx)
|
||||
w = bytestream2_get_le16u(&ctx->gb);
|
||||
h = bytestream2_get_le16u(&ctx->gb);
|
||||
|
||||
if (!w || !h) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "dimensions are invalid\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (ctx->width < left + w || ctx->height < top + h) {
|
||||
ctx->avctx->width = FFMAX(left + w, ctx->width);
|
||||
ctx->avctx->height = FFMAX(top + h, ctx->height);
|
||||
if (av_image_check_size(FFMAX(left + w, ctx->width),
|
||||
FFMAX(top + h, ctx->height), 0, ctx->avctx) < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
avcodec_set_dimensions(ctx->avctx, FFMAX(left + w, ctx->width),
|
||||
FFMAX(top + h, ctx->height));
|
||||
init_sizes(ctx, left + w, top + h);
|
||||
if (init_buffers(ctx)) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "error resizing buffers\n");
|
||||
|
@@ -342,6 +342,7 @@ static int read_header(ShortenContext *s)
|
||||
s->channels = get_uint(s, CHANSIZE);
|
||||
if (s->channels > MAX_CHANNELS) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
|
||||
s->channels = 0;
|
||||
return -1;
|
||||
}
|
||||
s->avctx->channels = s->channels;
|
||||
|
@@ -207,9 +207,11 @@ static char *doubles2str(double *dp, int count, const char *sep)
|
||||
{
|
||||
int i;
|
||||
char *ap, *ap0;
|
||||
int component_len = 15 + strlen(sep);
|
||||
uint64_t component_len = 15LL + strlen(sep);
|
||||
if (!sep) sep = ", ";
|
||||
ap = av_malloc(component_len * count);
|
||||
if (count >= (INT_MAX - 1)/component_len)
|
||||
return NULL;
|
||||
ap = av_malloc(component_len * count + 1);
|
||||
if (!ap)
|
||||
return NULL;
|
||||
ap0 = ap;
|
||||
@@ -228,14 +230,22 @@ static char *shorts2str(int16_t *sp, int count, const char *sep)
|
||||
{
|
||||
int i;
|
||||
char *ap, *ap0;
|
||||
uint64_t component_len;
|
||||
if (!sep) sep = ", ";
|
||||
ap = av_malloc((5 + strlen(sep)) * count);
|
||||
component_len = 7LL + strlen(sep);
|
||||
if (count >= (INT_MAX - 1)/component_len)
|
||||
return NULL;
|
||||
ap = av_malloc(component_len * count + 1);
|
||||
if (!ap)
|
||||
return NULL;
|
||||
ap0 = ap;
|
||||
ap[0] = '\0';
|
||||
for (i = 0; i < count; i++) {
|
||||
int l = snprintf(ap, 5 + strlen(sep), "%d%s", sp[i], sep);
|
||||
unsigned l = snprintf(ap, component_len, "%d%s", sp[i], sep);
|
||||
if (l >= component_len) {
|
||||
av_free(ap0);
|
||||
return NULL;
|
||||
}
|
||||
ap += l;
|
||||
}
|
||||
ap0[strlen(ap0) - strlen(sep)] = '\0';
|
||||
|
@@ -1703,7 +1703,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
|
||||
av_log(avctx, AV_LOG_DEBUG, "skip %d samples due to side data\n",
|
||||
avctx->internal->skip_samples);
|
||||
}
|
||||
if (avctx->internal->skip_samples) {
|
||||
if (avctx->internal->skip_samples && *got_frame_ptr) {
|
||||
if(frame->nb_samples <= avctx->internal->skip_samples){
|
||||
*got_frame_ptr = 0;
|
||||
avctx->internal->skip_samples -= frame->nb_samples;
|
||||
@@ -1744,7 +1744,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
|
||||
* make sure it's set correctly; assume decoders that actually use
|
||||
* extended_data are doing it correctly */
|
||||
planar = av_sample_fmt_is_planar(frame->format);
|
||||
channels = av_get_channel_layout_nb_channels(frame->channel_layout);
|
||||
channels = frame->channels;
|
||||
if (!(planar && channels > AV_NUM_DATA_POINTERS))
|
||||
frame->extended_data = frame->data;
|
||||
|
||||
|
@@ -160,7 +160,7 @@ static int rle_unpack(const unsigned char *src, int src_len, int src_count,
|
||||
const unsigned char *ps;
|
||||
const unsigned char *ps_end;
|
||||
unsigned char *pd;
|
||||
int i, l;
|
||||
int i, j, l;
|
||||
unsigned char *dest_end = dest + dest_len;
|
||||
|
||||
ps = src;
|
||||
@@ -186,9 +186,9 @@ static int rle_unpack(const unsigned char *src, int src_len, int src_count,
|
||||
ps += l;
|
||||
pd += l;
|
||||
} else {
|
||||
if (dest_end - pd < i || ps_end - ps < 2)
|
||||
if (dest_end - pd < 2*l || ps_end - ps < 2)
|
||||
return ps - src;
|
||||
for (i = 0; i < l; i++) {
|
||||
for (j = 0; j < l; j++) {
|
||||
*pd++ = ps[0];
|
||||
*pd++ = ps[1];
|
||||
}
|
||||
|
@@ -536,6 +536,11 @@ static int vqa_decode_chunk(VqaContext *s)
|
||||
bytestream2_seek(&s->gb, cbp0_chunk, SEEK_SET);
|
||||
chunk_size = bytestream2_get_be32(&s->gb);
|
||||
|
||||
if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "cbp0 chunk too large (0x%X bytes)\n", chunk_size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* accumulate partial codebook */
|
||||
bytestream2_get_buffer(&s->gb, &s->next_codebook_buffer[s->next_codebook_buffer_index],
|
||||
chunk_size);
|
||||
@@ -559,6 +564,11 @@ static int vqa_decode_chunk(VqaContext *s)
|
||||
bytestream2_seek(&s->gb, cbpz_chunk, SEEK_SET);
|
||||
chunk_size = bytestream2_get_be32(&s->gb);
|
||||
|
||||
if (chunk_size > MAX_CODEBOOK_SIZE - s->next_codebook_buffer_index) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "cbpz chunk too large (0x%X bytes)\n", chunk_size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* accumulate partial codebook */
|
||||
bytestream2_get_buffer(&s->gb, &s->next_codebook_buffer[s->next_codebook_buffer_index],
|
||||
chunk_size);
|
||||
|
@@ -57,7 +57,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int number, len;
|
||||
|
||||
ptr += strcspn(ptr, "#");
|
||||
if (sscanf(ptr, "#define %256s %u", name, &number) != 2) {
|
||||
if (sscanf(ptr, "#define %255s %u", name, &number) != 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unexpected preprocessor directive\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@@ -195,7 +195,7 @@ static void process_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
|
||||
av_log(ctx, AV_LOG_ERROR, "Frame after EOF on input %s\n",
|
||||
ctx->input_pads[in_no].name);
|
||||
avfilter_unref_buffer(buf);
|
||||
} if (in_no >= cat->cur_idx + ctx->nb_outputs) {
|
||||
} else if (in_no >= cat->cur_idx + ctx->nb_outputs) {
|
||||
ff_bufqueue_add(ctx, &cat->in[in_no].queue, buf);
|
||||
} else {
|
||||
push_frame(ctx, in_no, buf);
|
||||
|
@@ -91,13 +91,13 @@ static int movie_request_frame(AVFilterLink *outlink);
|
||||
static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec)
|
||||
{
|
||||
int i, ret, already = 0, stream_id = -1;
|
||||
char type_char, dummy;
|
||||
char type_char[2], dummy;
|
||||
AVStream *found = NULL;
|
||||
enum AVMediaType type;
|
||||
|
||||
ret = sscanf(spec, "d%[av]%d%c", &type_char, &stream_id, &dummy);
|
||||
ret = sscanf(spec, "d%1[av]%d%c", type_char, &stream_id, &dummy);
|
||||
if (ret >= 1 && ret <= 2) {
|
||||
type = type_char == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
|
||||
type = type_char[0] == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
|
||||
ret = av_find_best_stream(avf, type, stream_id, -1, NULL, 0);
|
||||
if (ret < 0) {
|
||||
av_log(log, AV_LOG_ERROR, "No %s stream with index '%d' found\n",
|
||||
|
@@ -176,6 +176,7 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
|
||||
idet->prev = idet->cur;
|
||||
idet->cur = idet->next;
|
||||
idet->next = picref;
|
||||
link->cur_buf = NULL;
|
||||
|
||||
if (!idet->cur)
|
||||
return 0;
|
||||
|
@@ -191,7 +191,7 @@ static int aiff_probe(AVProbeData *p)
|
||||
static int aiff_read_header(AVFormatContext *s)
|
||||
{
|
||||
int size, filesize;
|
||||
int64_t offset = 0;
|
||||
int64_t offset = 0, position;
|
||||
uint32_t tag;
|
||||
unsigned version = AIFF_C_VERSION1;
|
||||
AVIOContext *pb = s->pb;
|
||||
@@ -235,8 +235,11 @@ static int aiff_read_header(AVFormatContext *s)
|
||||
goto got_sound;
|
||||
break;
|
||||
case MKTAG('I', 'D', '3', ' '):
|
||||
position = avio_tell(pb);
|
||||
ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta);
|
||||
ff_id3v2_free_extra_meta(&id3v2_extra_meta);
|
||||
if (position + size > avio_tell(pb))
|
||||
avio_skip(pb, position + size - avio_tell(pb));
|
||||
break;
|
||||
case MKTAG('F', 'V', 'E', 'R'): /* Version chunk */
|
||||
version = avio_rb32(pb);
|
||||
|
@@ -695,7 +695,9 @@ static int avi_read_header(AVFormatContext *s)
|
||||
}
|
||||
break;
|
||||
case MKTAG('s', 't', 'r', 'd'):
|
||||
if (stream_index >= (unsigned)s->nb_streams || s->streams[stream_index]->codec->extradata_size) {
|
||||
if (stream_index >= (unsigned)s->nb_streams
|
||||
|| s->streams[stream_index]->codec->extradata_size
|
||||
|| s->streams[stream_index]->codec->codec_tag == MKTAG('H','2','6','4')) {
|
||||
avio_skip(pb, size);
|
||||
} else {
|
||||
uint64_t cur_pos = avio_tell(pb);
|
||||
|
@@ -209,7 +209,9 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags,
|
||||
"Missing call to av_register_all()?\n");
|
||||
}
|
||||
|
||||
if (filename[proto_len] != ':' && filename[proto_len] != ',' || is_dos_path(filename))
|
||||
if (filename[proto_len] != ':' &&
|
||||
(filename[proto_len] != ',' || !strchr(filename + proto_len + 1, ':')) ||
|
||||
is_dos_path(filename))
|
||||
strcpy(proto_str, "file");
|
||||
else
|
||||
av_strlcpy(proto_str, filename, FFMIN(proto_len+1, sizeof(proto_str)));
|
||||
|
@@ -376,8 +376,8 @@ static int dv_write_header(AVFormatContext *s)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (tcr)
|
||||
return av_timecode_init_from_string(&dvc->tc, rate, tcr->value, s);
|
||||
if (tcr && av_timecode_init_from_string(&dvc->tc, rate, tcr->value, s) >= 0)
|
||||
return 0;
|
||||
return av_timecode_init(&dvc->tc, rate, 0, 0, s);
|
||||
}
|
||||
|
||||
|
@@ -712,13 +712,13 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
st = s->streams[i];
|
||||
if (stream_type == FLV_STREAM_TYPE_AUDIO) {
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
|
||||
flv_same_audio_codec(st->codec, flags)) {
|
||||
(s->audio_codec_id || flv_same_audio_codec(st->codec, flags))) {
|
||||
break;
|
||||
}
|
||||
} else
|
||||
if (stream_type == FLV_STREAM_TYPE_VIDEO) {
|
||||
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
|
||||
flv_same_video_codec(st->codec, flags)) {
|
||||
(s->video_codec_id || flv_same_video_codec(st->codec, flags))) {
|
||||
break;
|
||||
}
|
||||
} else if (stream_type == FLV_STREAM_TYPE_DATA) {
|
||||
|
@@ -492,10 +492,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
return ret;
|
||||
} else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "Malformed AAC bitstream detected: "
|
||||
"use audio bistream filter 'aac_adtstoasc' to fix it "
|
||||
"('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
|
||||
if (flv->delay == AV_NOPTS_VALUE)
|
||||
|
@@ -536,11 +536,13 @@ static int hls_read_header(AVFormatContext *s)
|
||||
/* Create new AVStreams for each stream in this variant */
|
||||
for (j = 0; j < v->ctx->nb_streams; j++) {
|
||||
AVStream *st = avformat_new_stream(s, NULL);
|
||||
AVStream *ist = v->ctx->streams[j];
|
||||
if (!st) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto fail;
|
||||
}
|
||||
st->id = i;
|
||||
avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
|
||||
avcodec_copy_context(st->codec, v->ctx->streams[j]->codec);
|
||||
if (v->bandwidth)
|
||||
av_dict_set(&st->metadata, "variant_bitrate", bitrate_str,
|
||||
|
@@ -201,6 +201,8 @@ static int iff_read_header(AVFormatContext *s)
|
||||
break;
|
||||
|
||||
case ID_CMAP:
|
||||
if (data_size > INT_MAX - IFF_EXTRA_VIDEO_SIZE - FF_INPUT_BUFFER_PADDING_SIZE)
|
||||
return AVERROR_INVALIDDATA;
|
||||
st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
|
||||
st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!st->codec->extradata)
|
||||
@@ -323,6 +325,7 @@ static int iff_read_header(AVFormatContext *s)
|
||||
if (!st->codec->extradata)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
av_assert0(st->codec->extradata_size >= IFF_EXTRA_VIDEO_SIZE);
|
||||
buf = st->codec->extradata;
|
||||
bytestream_put_be16(&buf, IFF_EXTRA_VIDEO_SIZE);
|
||||
bytestream_put_byte(&buf, iff->bitmap_compression);
|
||||
|
@@ -156,6 +156,15 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
av_log(s, AV_LOG_ERROR, "ADTS header detected - ADTS will not be incorrectly muxed into LATM\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (!s->streams[0]->codec->extradata) {
|
||||
if(pkt->size > 2 && pkt->data[0] == 0x56 && (pkt->data[1] >> 4) == 0xe &&
|
||||
(AV_RB16(pkt->data + 1) & 0x1FFF) + 3 == pkt->size)
|
||||
return ff_raw_write_packet(s, pkt);
|
||||
else
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (pkt->size > 0x1fff)
|
||||
goto too_large;
|
||||
|
||||
|
@@ -55,7 +55,6 @@ static int loas_probe(AVProbeData *p)
|
||||
if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1;
|
||||
else if(max_frames>100)return AVPROBE_SCORE_MAX/2;
|
||||
else if(max_frames>=3) return AVPROBE_SCORE_MAX/4;
|
||||
else if(max_frames>=1) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
@@ -21,6 +21,9 @@
|
||||
|
||||
#include "matroska.h"
|
||||
|
||||
/* If you add a tag here that is not in ff_codec_bmp_tags[]
|
||||
or ff_codec_wav_tags[], add it also to additional_audio_tags[]
|
||||
or additional_video_tags[] in matroskaenc.c */
|
||||
const CodecTags ff_mkv_codec_tags[]={
|
||||
{"A_AAC" , AV_CODEC_ID_AAC},
|
||||
{"A_AC3" , AV_CODEC_ID_AC3},
|
||||
@@ -111,7 +114,7 @@ const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREO_MODE_COUN
|
||||
"bottom_top",
|
||||
"top_bottom",
|
||||
"checkerboard_rl",
|
||||
"checkerboard_lr"
|
||||
"checkerboard_lr",
|
||||
"row_interleaved_rl",
|
||||
"row_interleaved_lr",
|
||||
"col_interleaved_rl",
|
||||
|
@@ -1885,10 +1885,10 @@ static void matroska_clear_queue(MatroskaDemuxContext *matroska)
|
||||
}
|
||||
|
||||
static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf,
|
||||
int size, int type,
|
||||
int* buf_size, int type,
|
||||
uint32_t **lace_buf, int *laces)
|
||||
{
|
||||
int res = 0, n;
|
||||
int res = 0, n, size = *buf_size;
|
||||
uint8_t *data = *buf;
|
||||
uint32_t *lace_size;
|
||||
|
||||
@@ -1986,6 +1986,7 @@ static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf,
|
||||
|
||||
*buf = data;
|
||||
*lace_buf = lace_size;
|
||||
*buf_size = size;
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -2205,7 +2206,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
|
||||
matroska->skip_to_keyframe = 0;
|
||||
}
|
||||
|
||||
res = matroska_parse_laces(matroska, &data, size, (flags & 0x06) >> 1,
|
||||
res = matroska_parse_laces(matroska, &data, &size, (flags & 0x06) >> 1,
|
||||
&lace_size, &laces);
|
||||
|
||||
if (res)
|
||||
@@ -2307,7 +2308,6 @@ static int matroska_parse_cluster_incremental(MatroskaDemuxContext *matroska)
|
||||
}
|
||||
}
|
||||
|
||||
if (res < 0) matroska->done = 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -1325,6 +1325,33 @@ static int mkv_query_codec(enum AVCodecID codec_id, int std_compliance)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const AVCodecTag additional_audio_tags[] = {
|
||||
{ AV_CODEC_ID_ALAC, 0XFFFFFFFF },
|
||||
{ AV_CODEC_ID_EAC3, 0XFFFFFFFF },
|
||||
{ AV_CODEC_ID_MLP, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_OPUS, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_PCM_S24BE, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_PCM_S32BE, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_QDM2, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_RA_144, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_RA_288, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_COOK, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_TRUEHD, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_TTA, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_WAVPACK, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_NONE, 0xFFFFFFFF }
|
||||
};
|
||||
|
||||
const AVCodecTag additional_video_tags[] = {
|
||||
{ AV_CODEC_ID_PRORES, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_RV10, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_RV20, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_RV30, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_RV40, 0xFFFFFFFF },
|
||||
{ AV_CODEC_ID_NONE, 0xFFFFFFFF }
|
||||
};
|
||||
|
||||
#if CONFIG_MATROSKA_MUXER
|
||||
AVOutputFormat ff_matroska_muxer = {
|
||||
.name = "matroska",
|
||||
@@ -1341,6 +1368,10 @@ AVOutputFormat ff_matroska_muxer = {
|
||||
.write_trailer = mkv_write_trailer,
|
||||
.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
|
||||
AVFMT_TS_NONSTRICT,
|
||||
.codec_tag = (const AVCodecTag* const []){
|
||||
ff_codec_bmp_tags, ff_codec_wav_tags,
|
||||
additional_audio_tags, additional_video_tags, 0
|
||||
},
|
||||
.subtitle_codec = AV_CODEC_ID_SSA,
|
||||
.query_codec = mkv_query_codec,
|
||||
};
|
||||
@@ -1377,5 +1408,8 @@ AVOutputFormat ff_matroska_audio_muxer = {
|
||||
.write_packet = mkv_write_packet,
|
||||
.write_trailer = mkv_write_trailer,
|
||||
.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT,
|
||||
.codec_tag = (const AVCodecTag* const []){
|
||||
ff_codec_wav_tags, additional_audio_tags, 0
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
@@ -676,6 +676,9 @@ static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
if (atom.size < 16)
|
||||
return 0;
|
||||
|
||||
/* skip version and flags */
|
||||
avio_skip(pb, 4);
|
||||
|
||||
ff_mov_read_chan(c->fc, pb, st, atom.size - 4);
|
||||
|
||||
return 0;
|
||||
|
@@ -1097,13 +1097,17 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
|
||||
mov_write_avcc_tag(pb, track);
|
||||
if(track->mode == MODE_IPOD)
|
||||
mov_write_uuid_tag_ipod(pb);
|
||||
} else if (track->enc->field_order != AV_FIELD_UNKNOWN)
|
||||
mov_write_fiel_tag(pb, track);
|
||||
else if (track->enc->codec_id == AV_CODEC_ID_VC1 && track->vos_len > 0)
|
||||
} else if (track->enc->codec_id == AV_CODEC_ID_VC1 && track->vos_len > 0)
|
||||
mov_write_dvc1_tag(pb, track);
|
||||
else if (track->vos_len > 0)
|
||||
mov_write_glbl_tag(pb, track);
|
||||
|
||||
if (track->enc->codec_id != AV_CODEC_ID_H264 &&
|
||||
track->enc->codec_id != AV_CODEC_ID_MPEG4 &&
|
||||
track->enc->codec_id != AV_CODEC_ID_DNXHD)
|
||||
if (track->enc->field_order != AV_FIELD_UNKNOWN)
|
||||
mov_write_fiel_tag(pb, track);
|
||||
|
||||
if (track->enc->sample_aspect_ratio.den && track->enc->sample_aspect_ratio.num &&
|
||||
track->enc->sample_aspect_ratio.den != track->enc->sample_aspect_ratio.num) {
|
||||
mov_write_pasp_tag(pb, track);
|
||||
@@ -3081,6 +3085,14 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
memcpy(trk->vos_data, enc->extradata, trk->vos_len);
|
||||
}
|
||||
|
||||
if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
if (enc->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
|
||||
/* from x264 or from bytestream h264 */
|
||||
/* nal reformating needed */
|
||||
@@ -3091,10 +3103,6 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else {
|
||||
size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size);
|
||||
}
|
||||
} else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
} else {
|
||||
avio_write(pb, pkt->data, size);
|
||||
}
|
||||
|
@@ -120,6 +120,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
||||
const int64_t xing_offtbl[2][2] = {{32, 17}, {17,9}};
|
||||
MPADecodeHeader c;
|
||||
int vbrtag_size = 0;
|
||||
int is_cbr;
|
||||
|
||||
v = avio_rb32(s->pb);
|
||||
if(ff_mpa_check_header(v) < 0)
|
||||
@@ -135,7 +136,8 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
||||
/* Check for Xing / Info tag */
|
||||
avio_skip(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1]);
|
||||
v = avio_rb32(s->pb);
|
||||
if(v == MKBETAG('X', 'i', 'n', 'g') || v == MKBETAG('I', 'n', 'f', 'o')) {
|
||||
is_cbr = v == MKBETAG('I', 'n', 'f', 'o');
|
||||
if (v == MKBETAG('X', 'i', 'n', 'g') || is_cbr) {
|
||||
v = avio_rb32(s->pb);
|
||||
if(v & XING_FLAG_FRAMES)
|
||||
frames = avio_rb32(s->pb);
|
||||
@@ -180,7 +182,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
||||
if(frames)
|
||||
st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate},
|
||||
st->time_base);
|
||||
if(size && frames)
|
||||
if (size && frames && !is_cbr)
|
||||
st->codec->bit_rate = av_rescale(size, 8 * c.sample_rate, frames * (int64_t)spf);
|
||||
|
||||
return 0;
|
||||
|
@@ -1014,6 +1014,18 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
|
||||
return dts;
|
||||
}
|
||||
|
||||
static int rm_read_seek(AVFormatContext *s, int stream_index,
|
||||
int64_t pts, int flags)
|
||||
{
|
||||
RMDemuxContext *rm = s->priv_data;
|
||||
|
||||
if (ff_seek_frame_binary(s, stream_index, pts, flags) < 0)
|
||||
return -1;
|
||||
rm->audio_pkt_cnt = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
AVInputFormat ff_rm_demuxer = {
|
||||
.name = "rm",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
|
||||
@@ -1023,6 +1035,7 @@ AVInputFormat ff_rm_demuxer = {
|
||||
.read_packet = rm_read_packet,
|
||||
.read_close = rm_read_close,
|
||||
.read_timestamp = rm_read_dts,
|
||||
.read_seek = rm_read_seek,
|
||||
};
|
||||
|
||||
AVInputFormat ff_rdt_demuxer = {
|
||||
|
@@ -343,11 +343,11 @@ int ff_amf_tag_size(const uint8_t *data, const uint8_t *data_end)
|
||||
data++;
|
||||
break;
|
||||
}
|
||||
if (data + size >= data_end || data + size < data)
|
||||
if (size < 0 || size >= data_end - data)
|
||||
return -1;
|
||||
data += size;
|
||||
t = ff_amf_tag_size(data, data_end);
|
||||
if (t < 0 || data + t >= data_end)
|
||||
if (t < 0 || t >= data_end - data)
|
||||
return -1;
|
||||
data += t;
|
||||
}
|
||||
@@ -376,7 +376,7 @@ int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
|
||||
int size = bytestream_get_be16(&data);
|
||||
if (!size)
|
||||
break;
|
||||
if (data + size >= data_end || data + size < data)
|
||||
if (size < 0 || size >= data_end - data)
|
||||
return -1;
|
||||
data += size;
|
||||
if (size == namelen && !memcmp(data-size, name, namelen)) {
|
||||
@@ -397,7 +397,7 @@ int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
|
||||
return 0;
|
||||
}
|
||||
len = ff_amf_tag_size(data, data_end);
|
||||
if (len < 0 || data + len >= data_end || data + len < data)
|
||||
if (len < 0 || len >= data_end - data)
|
||||
return -1;
|
||||
data += len;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ static const char* rtmp_packet_type(int type)
|
||||
|
||||
static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *data_end)
|
||||
{
|
||||
int size;
|
||||
unsigned int size;
|
||||
char buf[1024];
|
||||
|
||||
if (data >= data_end)
|
||||
@@ -446,7 +446,7 @@ static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *d
|
||||
} else {
|
||||
size = bytestream_get_be32(&data);
|
||||
}
|
||||
size = FFMIN(size, 1023);
|
||||
size = FFMIN(size, sizeof(buf) - 1);
|
||||
memcpy(buf, data, size);
|
||||
buf[size] = 0;
|
||||
av_log(ctx, AV_LOG_DEBUG, " string '%s'\n", buf);
|
||||
@@ -459,22 +459,21 @@ static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *d
|
||||
case AMF_DATA_TYPE_OBJECT:
|
||||
av_log(ctx, AV_LOG_DEBUG, " {\n");
|
||||
for (;;) {
|
||||
int size = bytestream_get_be16(&data);
|
||||
int t;
|
||||
memcpy(buf, data, size);
|
||||
buf[size] = 0;
|
||||
size = bytestream_get_be16(&data);
|
||||
av_strlcpy(buf, data, FFMIN(sizeof(buf), size + 1));
|
||||
if (!size) {
|
||||
av_log(ctx, AV_LOG_DEBUG, " }\n");
|
||||
data++;
|
||||
break;
|
||||
}
|
||||
if (data + size >= data_end || data + size < data)
|
||||
if (size >= data_end - data)
|
||||
return;
|
||||
data += size;
|
||||
av_log(ctx, AV_LOG_DEBUG, " %s: ", buf);
|
||||
ff_amf_tag_contents(ctx, data, data_end);
|
||||
t = ff_amf_tag_size(data, data_end);
|
||||
if (t < 0 || data + t >= data_end)
|
||||
if (t < 0 || t >= data_end - data)
|
||||
return;
|
||||
data += t;
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
#define APP_MAX_LENGTH 128
|
||||
#define APP_MAX_LENGTH 1024
|
||||
#define PLAYPATH_MAX_LENGTH 256
|
||||
#define TCURL_MAX_LENGTH 512
|
||||
#define FLASHVER_MAX_LENGTH 64
|
||||
@@ -305,7 +305,7 @@ static int gen_connect(URLContext *s, RTMPContext *rt)
|
||||
int ret;
|
||||
|
||||
if ((ret = ff_rtmp_packet_create(&pkt, RTMP_SYSTEM_CHANNEL, RTMP_PT_INVOKE,
|
||||
0, 4096)) < 0)
|
||||
0, 4096 + APP_MAX_LENGTH)) < 0)
|
||||
return ret;
|
||||
|
||||
p = pkt.data;
|
||||
@@ -2156,16 +2156,20 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
|
||||
fname = strchr(p + 1, '/');
|
||||
if (!fname || (c && c < fname)) {
|
||||
fname = p + 1;
|
||||
av_strlcpy(rt->app, path + 1, p - path);
|
||||
av_strlcpy(rt->app, path + 1, FFMIN(p - path, APP_MAX_LENGTH));
|
||||
} else {
|
||||
fname++;
|
||||
av_strlcpy(rt->app, path + 1, fname - path - 1);
|
||||
av_strlcpy(rt->app, path + 1, FFMIN(fname - path - 1, APP_MAX_LENGTH));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (old_app) {
|
||||
// The name of application has been defined by the user, override it.
|
||||
if (strlen(old_app) >= APP_MAX_LENGTH) {
|
||||
ret = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
}
|
||||
av_free(rt->app);
|
||||
rt->app = old_app;
|
||||
}
|
||||
|
@@ -31,14 +31,14 @@
|
||||
|
||||
static const uint8_t *avc_mp4_find_startcode(const uint8_t *start, const uint8_t *end, int nal_length_size)
|
||||
{
|
||||
int res = 0;
|
||||
unsigned int res = 0;
|
||||
|
||||
if (end - start < nal_length_size)
|
||||
return NULL;
|
||||
while (nal_length_size--)
|
||||
res = (res << 8) | *start++;
|
||||
|
||||
if (start + res > end || res < 0 || start + res < start)
|
||||
if (res > end - start)
|
||||
return NULL;
|
||||
|
||||
return start + res;
|
||||
|
@@ -269,7 +269,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else if(t & 0x40){ /* copy with offset */
|
||||
off = avio_r8(s->pb);
|
||||
j = (t & 0x3F) + 1;
|
||||
if (off + j > 0xff) {
|
||||
if (off + j - 1 > 0xff) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
||||
off, j);
|
||||
|
@@ -188,6 +188,10 @@ static int swf_write_header(AVFormatContext *s)
|
||||
AVCodecContext *enc = s->streams[i]->codec;
|
||||
if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
if (enc->codec_id == AV_CODEC_ID_MP3) {
|
||||
if (!enc->frame_size) {
|
||||
av_log(s, AV_LOG_ERROR, "audio frame size not set\n");
|
||||
return -1;
|
||||
}
|
||||
swf->audio_enc = enc;
|
||||
swf->audio_fifo= av_fifo_alloc(AUDIO_FIFO_SIZE);
|
||||
if (!swf->audio_fifo)
|
||||
@@ -449,7 +453,7 @@ static int swf_write_audio(AVFormatContext *s,
|
||||
}
|
||||
|
||||
av_fifo_generic_write(swf->audio_fifo, buf, size, NULL);
|
||||
swf->sound_samples += av_get_audio_frame_duration(enc, size);
|
||||
swf->sound_samples += enc->frame_size;
|
||||
|
||||
/* if audio only stream make sure we add swf frames */
|
||||
if (!swf->video_enc)
|
||||
|
@@ -642,7 +642,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
|
||||
goto fail;
|
||||
|
||||
if (id3v2_extra_meta) {
|
||||
if (!strcmp(s->iformat->name, "mp3")) {
|
||||
if (!strcmp(s->iformat->name, "mp3") || !strcmp(s->iformat->name, "aac")) {
|
||||
if((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0)
|
||||
goto fail;
|
||||
} else
|
||||
|
@@ -413,6 +413,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
|
||||
char description[1024];
|
||||
unsigned int filesize;
|
||||
AVStream *st;
|
||||
int ret;
|
||||
int64_t pos = avio_tell(pb);
|
||||
|
||||
avio_get_str16le(pb, INT_MAX, mime, sizeof(mime));
|
||||
@@ -429,13 +430,14 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
|
||||
if (!st)
|
||||
goto done;
|
||||
av_dict_set(&st->metadata, "title", description, 0);
|
||||
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
st->codec->codec_id = AV_CODEC_ID_MJPEG;
|
||||
st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
|
||||
st->codec->extradata = av_mallocz(filesize);
|
||||
if (!st->codec->extradata)
|
||||
ret = av_get_packet(pb, &st->attached_pic, filesize);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
st->codec->extradata_size = filesize;
|
||||
avio_read(pb, st->codec->extradata, filesize);
|
||||
st->attached_pic.stream_index = st->index;
|
||||
st->attached_pic.flags |= AV_PKT_FLAG_KEY;
|
||||
st->disposition |= AV_DISPOSITION_ATTACHED_PIC;
|
||||
done:
|
||||
avio_seek(pb, pos + length, SEEK_SET);
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "common.h"
|
||||
#include "mathematics.h"
|
||||
#include "intfloat_readwrite.h"
|
||||
|
||||
@@ -88,7 +89,7 @@ AVExtFloat av_dbl2ext(double d){
|
||||
ext.mantissa[i] = m>>(56-(i<<3));
|
||||
} else if (f != 0.0) {
|
||||
ext.exponent[0] = 0x7f; ext.exponent[1] = 0xff;
|
||||
if (f != INFINITY)
|
||||
if (!isinf(f))
|
||||
ext.mantissa[0] = ~0;
|
||||
}
|
||||
if (d < 0)
|
||||
|
@@ -177,7 +177,7 @@ static void format_line(void *ptr, int level, const char *fmt, va_list vl,
|
||||
if (parent && *parent) {
|
||||
snprintf(part[0], part_size, "[%s @ %p] ",
|
||||
(*parent)->item_name(parent), parent);
|
||||
if(type) type[0] = get_category(((uint8_t *) ptr) + avc->parent_log_context_offset);
|
||||
if(type) type[0] = get_category(parent);
|
||||
}
|
||||
}
|
||||
snprintf(part[1], part_size, "[%s @ %p] ",
|
||||
|
@@ -205,13 +205,13 @@ int main (void)
|
||||
av_lfg_init(&prng, 1);
|
||||
|
||||
for (i = 0; i < 10000; i++) {
|
||||
int j = av_lfg_get(&prng) % 86294;
|
||||
intptr_t j = av_lfg_get(&prng) % 86294;
|
||||
if (check(root) > 999) {
|
||||
av_log(NULL, AV_LOG_ERROR, "FATAL error %d\n", i);
|
||||
print(root, 0);
|
||||
return -1;
|
||||
}
|
||||
av_log(NULL, AV_LOG_ERROR, "inserting %4d\n", j);
|
||||
av_log(NULL, AV_LOG_ERROR, "inserting %4d\n", (int)j);
|
||||
if (!node)
|
||||
node = av_mallocz(av_tree_node_size);
|
||||
av_tree_insert(&root, (void *) (j + 1), cmp, &node);
|
||||
@@ -219,7 +219,7 @@ int main (void)
|
||||
j = av_lfg_get(&prng) % 86294;
|
||||
{
|
||||
AVTreeNode *node2 = NULL;
|
||||
av_log(NULL, AV_LOG_ERROR, "removing %4d\n", j);
|
||||
av_log(NULL, AV_LOG_ERROR, "removing %4d\n", (int)j);
|
||||
av_tree_insert(&root, (void *) (j + 1), cmp, &node2);
|
||||
k = av_tree_find(root, (void *) (j + 1), cmp, NULL);
|
||||
if (k)
|
||||
|
@@ -223,6 +223,16 @@ av_cold int swr_init(struct SwrContext *s){
|
||||
|
||||
s->flushed = 0;
|
||||
|
||||
if(av_get_channel_layout_nb_channels(s-> in_ch_layout) > SWR_CH_MAX) {
|
||||
av_log(s, AV_LOG_WARNING, "Input channel layout 0x%"PRIx64" is invalid or unsupported.\n", s-> in_ch_layout);
|
||||
s->in_ch_layout = 0;
|
||||
}
|
||||
|
||||
if(av_get_channel_layout_nb_channels(s->out_ch_layout) > SWR_CH_MAX) {
|
||||
av_log(s, AV_LOG_WARNING, "Output channel layout 0x%"PRIx64" is invalid or unsupported.\n", s->out_ch_layout);
|
||||
s->out_ch_layout = 0;
|
||||
}
|
||||
|
||||
if(s-> in_sample_fmt >= AV_SAMPLE_FMT_NB){
|
||||
av_log(s, AV_LOG_ERROR, "Requested input sample format %d is invalid\n", s->in_sample_fmt);
|
||||
return AVERROR(EINVAL);
|
||||
|
@@ -631,6 +631,9 @@ static rgbConvFn findRgbConvFn(SwsContext *c)
|
||||
}
|
||||
}
|
||||
|
||||
if ((dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_BGR32_1) && !isRGBA32(srcFormat) && ALT32_CORR<0)
|
||||
return NULL;
|
||||
|
||||
return conv;
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
40a4e41ae74ec8dacdf02402831a6a58 *./tests/data/lavf-fate/lavf.mp3
|
||||
97230 ./tests/data/lavf-fate/lavf.mp3
|
||||
7fcf80c2059b5c058a6cdd2e2f798b6c *./tests/data/lavf-fate/lavf.mp3
|
||||
96366 ./tests/data/lavf-fate/lavf.mp3
|
||||
./tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe
|
||||
|
@@ -1,9 +1,9 @@
|
||||
808ea110635774252439722a48329d61 *./tests/data/images/dpx/02.dpx
|
||||
d2f0b4e854fda2d3b3bee84cef80593c *./tests/data/images/dpx/02.dpx
|
||||
./tests/data/images/dpx/%02d.dpx CRC=0x6da01946
|
||||
305792 ./tests/data/images/dpx/02.dpx
|
||||
5e1a777fa3f4094c9c4dd989cf9e8e8b *./tests/data/images/dpx/02.dpx
|
||||
075963c3c08978b6a20555ba09161434 *./tests/data/images/dpx/02.dpx
|
||||
./tests/data/images/dpx/%02d.dpx CRC=0xe5b9c023
|
||||
609920 ./tests/data/images/dpx/02.dpx
|
||||
13dc41b1e1e36399a5e1f8b7e3344a81 *./tests/data/images/dpx/02.dpx
|
||||
b9f22728f8ff393bf30cf6cbd624fa95 *./tests/data/images/dpx/02.dpx
|
||||
./tests/data/images/dpx/%02d.dpx CRC=0xf0a1c097
|
||||
407168 ./tests/data/images/dpx/02.dpx
|
||||
|
Reference in New Issue
Block a user