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

17552 Commits

Author SHA1 Message Date
Andreas Cadhalpun
153639cb9c mov: fix DTS calculation for samples with negative stts duration
A negative sample duration is invalid according to the spec, but there
are samples that use it for the DTS calculation, e.g.:
http://files.1f0.de/samples/mp4-negative-stts-problem.mp4

These currently get out of A/V sync.

Also change the logging type to AV_LOG_WARNING, because decoding the
sample can continue.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-29 19:35:58 +02:00
Michael Niedermayer
061a592b9c avformat/movenc: Check that track_width_1616 fits within the available 32bit before storing it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 12:54:37 +02:00
Michael Niedermayer
14bc570442 avformat/movenc: avoid floats in width/height/aspect ratio computations
This avoids the possibility for rounding/precision differences between platforms

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 12:46:58 +02:00
Michael Niedermayer
3331213e2a avformat/concatdec: Enable auto_convert by default
Users have no means to find out from a failure how to make it work
or is it preferred to check and print a warning for h264 concat without auto_convert ?

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 12:19:47 +02:00
Michael Niedermayer
e1b0019568 avformat/mov: Avoid float usage in yuv_to_rgba()
This avoids the possibility for rounding/precision differences between platforms

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 12:16:08 +02:00
Michael Niedermayer
4b8b3efb1e Merge commit 'e9e86d9ef637f5a600c76b352ffe5a82b71b25d1'
* commit 'e9e86d9ef637f5a600c76b352ffe5a82b71b25d1':
  rtmpdh: Create sufficiently long private keys for gcrypt/nettle

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 11:42:43 +02:00
Michael Niedermayer
42a6a38418 Merge commit '8016a1bd3b60e917e1b12748dd80c06c3462c286'
* commit '8016a1bd3b60e917e1b12748dd80c06c3462c286':
  rtmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 11:42:22 +02:00
Michael Niedermayer
48e02e258c Merge commit '063f7467e4d14ab7fe01b2845dab60cc75df8b53'
* commit '063f7467e4d14ab7fe01b2845dab60cc75df8b53':
  rtmpdh: Add fate test for the DH handshake routine

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 11:38:37 +02:00
Michael Niedermayer
fbeb3fa999 Merge commit '0508faaa11bf7507ffdd655aee57c9dc5a8203f4'
* commit '0508faaa11bf7507ffdd655aee57c9dc5a8203f4':
  rtmpdh: Pass the actual buffer size of the output secret key

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 11:32:07 +02:00
Michael Niedermayer
beecbe13a2 Merge commit '9f1b3050d9e31e9283d818f3640f3460ac8cfb5b'
* commit '9f1b3050d9e31e9283d818f3640f3460ac8cfb5b':
  rtmpdh: Check the output buffer size in the openssl version of dh_compute_key

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 11:31:43 +02:00
Michael Niedermayer
4c0b30b07a Merge commit '127d813bcb5705202b7100cf1eccd1e26d72ba14'
* commit '127d813bcb5705202b7100cf1eccd1e26d72ba14':
  rtmpdh: Fix a local variable name in the nettle/gcrypt codepath

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 11:31:26 +02:00
Michael Niedermayer
392832fc3a Merge commit '78efc69e7c990226f4b913721ef1b308ca5bfa04'
* commit '78efc69e7c990226f4b913721ef1b308ca5bfa04':
  rtmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 11:21:35 +02:00
Martin Storsjö
e9e86d9ef6 rtmpdh: Create sufficiently long private keys for gcrypt/nettle
There was a misunderstanding betewen bits and bytes for the parameter
value for generating random big numbers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:41 +03:00
Martin Storsjö
8016a1bd3b rtmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:38 +03:00
Martin Storsjö
063f7467e4 rtmpdh: Add fate test for the DH handshake routine
This helps if these functions need to be implemented using another
crypto API.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:35 +03:00
Martin Storsjö
0508faaa11 rtmpdh: Pass the actual buffer size of the output secret key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:32 +03:00
Martin Storsjö
9f1b3050d9 rtmpdh: Check the output buffer size in the openssl version of dh_compute_key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:30 +03:00
Martin Storsjö
127d813bcb rtmpdh: Fix a local variable name in the nettle/gcrypt codepath
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:28 +03:00
Martin Storsjö
78efc69e7c rtmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:24 +03:00
Roman Savchenko
e85d91da48 avformat/avienc: Correct possible dereference of null
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 00:04:41 +02:00
Michael Niedermayer
f0b99112e3 Merge commit 'd4d90504a687d2c0ef77ccf11d831f24dcff9cf1'
* commit 'd4d90504a687d2c0ef77ccf11d831f24dcff9cf1':
  tls_gnutls: Add missing includes for the gcrypt thread safety callbacks

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:21:07 +02:00
Michael Niedermayer
b06e82e738 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  lavc/x264: Support bgr0 as input pix_fmt.
  lavf: Use av_codec_get_tag2() in avformat_query_codec().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 14:12:46 +02:00
Martin Storsjö
d4d90504a6 tls_gnutls: Add missing includes for the gcrypt thread safety callbacks
This fixes building with gcrypt-backed gnutls versions, broken
in 57cde2b180.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-28 15:05:52 +03:00
Michael Niedermayer
5a3d2541bd avformat/mxfenc: Support storing signal standard for D10 muxing
Reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 12:36:08 +02:00
Carl Eugen Hoyos
57eecd9e4f lavf: Use av_codec_get_tag2() in avformat_query_codec().
av_codec_get_tag() can return 0 both in case of error and success.
2015-05-28 12:31:40 +02:00
Timothy Gu
7206b94fb8 network: Move variable declaration under an #if
Avoids an unused variable warning.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 03:06:05 +02:00
wm4
a9f1d584e5 lavf: move TLS-related ifdeffery to library specific files
There is no need to have this mess in network.c.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 22:24:00 +02:00
wm4
4a006b9eb7 lavf: split tls.c
Move the OpenSSL and GnuTLS implementations to their own files. Other
than the connection code (including options) and some boilerplate, no
code is actually shared.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 21:48:47 +02:00
Michael Niedermayer
07fc47909f avformat/mpsubdec: Use double instead of float for timestamp calculations
This provides higher precission

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 17:29:18 +02:00
Michael Niedermayer
f722009ad9 avformat/mp3dec: Ensure the buffer is large enough to avoid seeks from the first frame search
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 17:06:24 +02:00
wm4
2b3e9bbfb5 avformat/mp3: skip junk at the beginning of mp3 files
Apparently it can happen that a mp3 file has junk data between id3 tag
and actual mp3 data. Skip this to avoid outputting nonsense timestamps.
(Two packets had the same timestamps, because the mp3 parser failed to
compute a frame duration.)

In this case, the junk consisted of 1044 bytes of zero, which
incidentally is the same size as normal mp3 frames in this stream. I
suspect the mp3 was edited with some tool which wiped the Xing/LAME
headers. Data near the end of the file suggests it was encoded with
"LAME3.97", but the normal Xing/LAME headers are missing. So this could
be "normal". mpg123 also attempts to skip at least 64KB of junk data by
scanning for headers.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 15:50:04 +02:00
Michael Niedermayer
2ae0396814 avformat/mpsubdec: change multipler to int, it only stores 1 and 100
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 15:24:34 +02:00
Michael Niedermayer
023040ed0d avformat/movenc: Allow muxing mp3 with samplerate < 16khz if the user sets strict to -1
Fixes Ticket4267

Approved-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 01:47:59 +02:00
wm4
57cde2b180 lavf: move TLS-related ifdeffery to library specific files
There is no need to have this mess in network.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:51 +03:00
wm4
d8ffb2055f lavf: split tls.c
Move the OpenSSL and GnuTLS implementations to their own files. Other
than the connection code (including options) and some boilerplate, no
code is actually shared.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:32 +03:00
Michael Niedermayer
cf86fd0069 avformat/matroskaenc: Avoid floats in default duration calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 20:42:05 +02:00
Michael Niedermayer
8aa9853093 avformat/ircamenc: Avoid floats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 19:54:41 +02:00
Michael Niedermayer
894d8cf418 avformat/movenc: Avoid floats & float rounding in tmcd nb_frames calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 14:51:00 +02:00
Michael Niedermayer
f902b0b2cb avformat/asfdec: Avoid float usage in duration calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 13:51:29 +02:00
Michael Niedermayer
db07fc2020 avformat/mpegts: Avoid float in bitrate calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 12:02:44 +02:00
Carl Eugen Hoyos
5193407cf6 lavf/dnxhd: Autodetect more files that can be decoded. 2015-05-26 00:29:36 +02:00
Andreas Cadhalpun
83a04f8cc1 mov: reject zero bytes_per_frame with non-zero samples_per_frame
In this case the mov demuxer can return a large number of empty packets.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-26 00:28:02 +02:00
Carl Eugen Hoyos
860ac0a5bb lavf/riff: Add 0x729A as TwoCC for G.729.
Reported by forum user muchuan.
2015-05-25 23:39:56 +02:00
Michael Niedermayer
cf401cd12b avformat/rmenc: Avoid floats in duration calculation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 13:34:43 +02:00
Michael Niedermayer
343654c288 avformat/mpegenc: Replace *0.7 by *7/10
This avoids another float computation, avoiding a potential source of
rounding issues

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 13:34:34 +02:00
Michael Niedermayer
73f7179924 avformat/mpegenc: Do not use floats for vcd_padding_bitrate
This reduces the risk for rounding differences.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 12:43:51 +02:00
Michael Niedermayer
8ce564ea28 avformat/mov: Mark avio context of decompressed atoms as seekable
Fixes Ticket4329

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 01:26:55 +02:00
Andreas Cadhalpun
b71528d896 mov: always check avio_read return value
If avio_read fails, the buffer can contain uninitialized data.

This fixes 'Conditional jump or move depends on uninitialised value(s)'
valgrind warnings.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-24 15:08:21 +02:00
Andreas Cadhalpun
8e77f8ab4a mov: fix two memleaks
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-24 15:08:21 +02:00
Andreas Cadhalpun
a5718863da mov: abort on EOF in ff_mov_read_chan
Otherwise the loop can take a lot of time if num_descr is very large.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-24 15:07:52 +02:00