1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

41518 Commits

Author SHA1 Message Date
Martin Storsjö
b81b0cc22b movenc: Set the last packet duration based on the next packet when autoflushing
When automatically flushing fragments based on set conditions
(fragmentation on keyframes, after some interval or byte size),
we already have the next packet for one stream - use this for setting
the duration of the last packet in the flushed fragment correctly.

This avoids having to adjust the timestamp of the first packet in
the new fragment since the last duration was unknown.

Unfortunately, this only works for automatic flushing (not for
caller-triggered flushing, like in the dash muxer), and only for the
one single track that triggered the flushing. The duration of the
last sample in all other tracks still is dependent on AVPacket
duration (or heuristics).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:07 +02:00
Martin Storsjö
3041183677 dashenc: Heuristically fill in the duration of packets that need it
This avoids that the mp4 muxer does a similar heuristic, adjusting
the timestamps in a way that the dash muxer doesn't know the actual
timestamps written to the file in the end. By making sure that the
mp4 muxer internal heuristic isn't applied, we know the exact
timestamps written to file, so that the timestamps in manifest match
the files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:03 +02:00
Martin Storsjö
2889c5e167 movenc: Heuristically set the duration of the last sample in a fragment if not set
Even if this is a guess, it is way better than writing a zero duration
of the last sample in a fragment (because if the duration is zero,
the first sample of the next fragment will have the same timestamp
as the last sample in the previous one).

Since we normally don't require libavformat muxer users to set
the duration field in AVPacket, we probably can't strictly require
it here either, so don't log this as a strict warning, only as info.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:26:52 +02:00
Martin Storsjö
8dc72eeaf6 udp: Fix crashes after adding AVOptions
Add a missing AVClass member, check whether localaddr is null.
(Previously, localaddr was always a local stack buffer, while it
now also can be an avoption string which can be null.)

This fixes crashes when not passing any localaddr parameter, since
66028b7ba.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:25:22 +02:00
Derek Buitenhuis
8692d74b73 mov: Add option to keep exact packet sequence after seeking
The current behavior may produce a different sequence of packets
after seeking, compared to demuxing linearly from the beginning.
This is because the MOV demuxer seeks in each stream individually,
based on timestamp, which may set each stream at a slightly different
position than if the file would have been read sequentially.

This makes implementing certain operations, such as segmenting,
quite hard, and slower than need be.

Therefore, add an option which retains the same packet sequence
after seeking, as when a file is demuxed linearly.
2015-03-18 14:28:56 +00:00
Martin Storsjö
58a840e215 Replace a few leftover instances of enum PixelFormat with enum AVPixelFormat
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-17 23:53:33 +02:00
Vittorio Giovara
6289706b35 fate: Move tdsc to the appropriate screen capture file 2015-03-17 13:36:10 +00:00
Vittorio Giovara
423f5d50e4 mov: Fix little endian audio detection
Set this field to TRUE if the audio component is to operate on
little-endian data, and FALSE otherwise.

However TRUE and FALSE are not defined. Since this flag is just a boolean,
interpret all values except for 0 as little endian.

Sample-Id: 64bit_FLOAT_Little_Endian.mov
2015-03-17 13:34:23 +00:00
Vittorio Giovara
cdce9e8025 aacsbr: Fix type for index variable
Prevents unsigned overflow and variable truncation.

Bug-Id: CID 603186
2015-03-17 13:34:23 +00:00
Vittorio Giovara
7c60c124c8 hqx: Drop unused offsets table
This is a leftover from the static to dynamic vlc table conversion.
2015-03-17 13:34:23 +00:00
Carl Eugen Hoyos
4326bc364b lavf: Do not list mov-only codecs in riff tags
Instead check for all mov code-points when demuxing avi
and print a warning if a video codec is found like this.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-17 13:34:22 +00:00
Paul B Mahol
cf9861dea5 isom: Add X-Com Radvision FourCC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-03-17 13:34:22 +00:00
Vittorio Giovara
02d76141d6 riff: Add 'tshd' FourCC for H.264 2015-03-17 13:34:22 +00:00
Carl Eugen Hoyos
c0f504e947 libx264: Allow full-range yuv422 and yuv444 pixel formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-17 13:34:22 +00:00
Niels Möller
c9ed48e80e dca: Read params->pancABIT0[param_index] only if part0 is set
Prevent a spurious read from uninitialized memory.
2015-03-17 12:31:07 +01:00
Luca Barbato
48aef27f52 x86: Put COPY3_IF_LT under HAVE_6REGS
It uses 6 registers, unbreaks building on hardened x86 system.

Bug-Id: gentoo/541930
CC: libav-stable@libav.org
2015-03-17 12:31:04 +01:00
Luca Barbato
96dd04427f isom: Add support for TSCC2
As produced by Camtasia 4.
2015-03-17 12:21:23 +01:00
Diego Biurrun
91894f27dc configure: Disable shift operator precedence warnings with MSVC 2015-03-17 11:59:31 +01:00
Martin Storsjö
2cb9c2fc59 movenc: Allow interleaving samples when writing fragmented files
This is incompatible with the omit_tfhd_offset flag (writing
position independent fragments with interleaving requires the
default_base_moof flag).

This makes the moof atoms slightly bigger, but can be better for
playback (improving locality of sample data in the mdat).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-16 13:23:19 +02:00
Martin Storsjö
50ff0c05b6 movenc: Support writing multiple trun atoms
This is needed if all the data for one track isn't continuous
within the mdat. Normally we make sure all the data for one
track is continuous, but in new cases we will need to have
the samples interleaved.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-16 13:23:19 +02:00
Janne Grunau
faab8f9fcb configure: move cross_compile checks after the toolchain section 2015-03-16 11:55:47 +01:00
Janne Grunau
3e1b5cbc9a configure: handle Apple's armv7s in probe_arm_arch() 2015-03-16 11:55:47 +01:00
Janne Grunau
f01c771577 fate: add explicit support for the toolchain configure option 2015-03-16 11:55:47 +01:00
Janne Grunau
a9d60c390f doc: fate: remove outdated SSH key fingerprint 2015-03-16 11:55:47 +01:00
Luca Barbato
66a0ac0a80 mkv: Add support for DVB subtitles
Bug-Id: 833
2015-03-15 23:49:17 +01:00
Himangi Saraogi
9a60b1fad0 libswscale: fix compiler warnings enumerated type mixed with another type
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-15 18:29:22 +01:00
Luca Barbato
66028b7ba6 udp: Use AVOptions
Add AVOptions for options currently available as url parameters.
2015-03-15 18:29:11 +01:00
Luca Barbato
a4c5801070 sctp: Update to match tcp
Use AVOption and fallback over multiple addresses
2015-03-15 18:29:11 +01:00
Diego Biurrun
acbe15a99f fate: Add test for DCA XLL 2015-03-15 14:51:44 +01:00
Niels Möller
217e4ff4d1 dca: Support for XLL (lossless extension)
Cleanup and integration by Diego Biurrun.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-03-15 14:51:36 +01:00
Diego Biurrun
4da5aacc7e dca: Mark syncword constants unsigned; they do not fit in 32-bit signed int 2015-03-13 21:20:37 +01:00
Vittorio Giovara
247e370e2a TDSC decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-13 19:48:14 +00:00
Vittorio Giovara
5a0e953c24 mjpeg: Mark decoder family as thread safe
No global variables are used and the VLC tables are allocated without
static elements. This will allow using a JPEG decoding context within
other decoders.
2015-03-13 19:48:07 +00:00
Vittorio Giovara
117b432748 lavc: Introduce AVCodec internal capabilities
This field is designed for marking codec properties useful to lavc internals.
Two internal capabilities are added:
 - FF_CODEC_CAP_INIT_THREADSAFE: codec can be opened without locks;
 - FF_CODEC_CAP_INIT_CLEANUP: codec frees memory if initialization fails.
2015-03-13 19:47:47 +00:00
Vittorio Giovara
9993a067f6 lavc: Improve thread locking error message 2015-03-13 19:47:34 +00:00
Himangi Saraogi
913aa9a487 libx264: Return more meaningful error codes
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-12 19:09:22 +01:00
Vittorio Giovara
6bdae41d3e matroskadec: Check memory allocations
CC: libav-stable@libav.org
2015-03-12 17:48:14 +00:00
Vittorio Giovara
c3bd1d60af formats: Check memory allocations 2015-03-12 17:46:47 +00:00
Vittorio Giovara
5a2645cafe nutdec: Prevent leaks on memory error
Bug-Id: CID 205122 / CID 205123
2015-03-12 15:29:59 +00:00
Vittorio Giovara
edca1dd552 xcbgrab: Check av_strdup() allocation
Bug-Id: CID 1274038
2015-03-12 15:29:59 +00:00
Vittorio Giovara
17c45d4d05 libtheora: Check frame allocation 2015-03-12 15:29:59 +00:00
Vittorio Giovara
a72d93daa0 mpegvideo_enc: Check AVCodecContext allocation 2015-03-12 15:29:59 +00:00
Niels Möller
78c8922841 dca: Document the permuted order in the lfe_fir_64 and lfe_fir_128 tables 2015-03-12 13:28:42 +01:00
Diego Biurrun
b97f427fb5 lavf: Explicitly convert types at function pointer assignment
This fixes a number of "assignment from incompatible pointer type" warnings.
2015-03-11 23:53:13 +01:00
Diego Biurrun
9c80740507 configure: Mark qsv subsystem as not selectable on the command line 2015-03-11 23:40:41 +01:00
Andreas Cadhalpun
67142a8c72 roqvideoenc: set enc->avctx in roq_encode_init
So far it is only set in roq_encode_frame, but it is used in
roq_encode_end to free the coded_frame. This currently segfaults if
roq_encode_frame is not called between roq_encode_init and
roq_encode_end.

CC:libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 20:28:13 +01:00
Andreas Cadhalpun
72211a2af0 asfenc: fix leaking asf->index_ptr on error
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 20:24:59 +01:00
Yukinori Yamazoe
212556cd21 qsv: Improve the log message of when initializing MFX_IMPL_HARDWARE{2, 3, 4}
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 19:48:01 +01:00
Vittorio Giovara
7a76c6c4df configure: Enable colored output for gcc 4.9+ 2015-03-11 18:01:36 +00:00
Vittorio Giovara
bacc92b59b rtpdec_vp9: Drop extra sanity check for size of input packet
In this case len is always at least 1, since it is checked against
RTP_VP9_DESC_REQUIRED_SIZE + 1 and then it is reduced by
RTP_VP9_DESC_REQUIRED_SIZE before entering the has_pic_id check.

Bug-Id: CID 1270811
2015-03-11 18:01:25 +00:00