Commit Graph

15935 Commits

Author SHA1 Message Date
Michael Niedermayer 676110e6d4 avformat/mxfdec: cleanup if parsing the header metadata fails
Fixes memleaks
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 06:08:34 +02:00
Michael Niedermayer 0834f2056c avformat/mxfdec: Fix memleak of packages_refs
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 06:08:34 +02:00
Michael Niedermayer aae4f5108d avformat/mxfdec: Fix memleak of primer_packs
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 06:08:28 +02:00
Michael Niedermayer e3b28f10bb avformat/mxfdec: Fix termination of mxf_data_essence_container_uls
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 02:09:17 +02:00
Michael Niedermayer 5552594a44 Merge commit 'a74f8121d88e0bdf0d69c22e4b3713032da9300a'
* commit 'a74f8121d88e0bdf0d69c22e4b3713032da9300a':
  mov: Handle tfdt atoms

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-14 22:24:12 +02:00
Michael Niedermayer 99c26805e9 Merge commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea'
* commit 'c2c22c75cf89e2faab34d1ee1d392cfb065439ea':
  movenc: Write tfdt atoms

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-14 22:03:51 +02:00
Martin Storsjö a74f8121d8 mov: Handle tfdt atoms
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-14 13:52:32 +03:00
Martin Storsjö c2c22c75cf movenc: Write tfdt atoms
These allow getting the absolute start timestamp of a fragment
without reading preceding timestamps. This fixes sync between
tracks if starting from fragments in different streams that don't
align exactly.

This also is a prerequisite for producing DASH content.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-14 13:52:32 +03:00
Michael Niedermayer d58fa9482e avformat/mp3enc: use initial_padding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-14 03:53:17 +02:00
Michael Niedermayer 4694c0bb7c Merge commit 'eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0'
* commit 'eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0':
  lavf: use initial_padding instead of deprecated delay

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-14 03:00:17 +02:00
Michael Niedermayer 40f2b16d52 avformat/utils: print more information with av_dlog() in compute_pkt_fields()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 23:45:52 +02:00
Anton Khirnov eabdc2a830 lavf: use initial_padding instead of deprecated delay 2014-10-13 19:10:30 +00:00
Benoit Fouet f87134c7a1 avformat/movenc: add support for syncframes concatenation for E-AC-3.
E-AC-3 samples should contain 6 audio blocks, so concatenate syncframes
in order to achieve this.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 19:24:06 +02:00
Michael Niedermayer 57884172e0 avformat/mov: fix mix of declaration and statement
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 16:12:30 +02:00
Mika Raento a59808dd57 mov.c: allow reading fragment start dts/pts from fragmented mp4
This introduces a new option to the mov demuxer: -use_mfra_for
(pts|dts). When it's given and moofs and a MFRA are present, the MFRA's
TFRAs are read for fragment start times.

Unfortunately some programs that produce fragmented mp4s use the TFRA
time field for dts and some for pts. There is no realistic way to detect
which is the case, hence the responsibility is punted onto the user.
This also means that no behavioural change is enabled by default - you
must pass either dts or pts for anything to happen.

Without this change, timestamps for some discontinuous fragmented mp4 are
wrong, and cause audio/video desync and are not usable for generating
HLS.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 12:20:55 +02:00
Michael Niedermayer 25a4180825 Merge commit '76c70e33d2244a688832f03b53862eb5d9ad3b01'
* commit '76c70e33d2244a688832f03b53862eb5d9ad3b01':
  icecast: Do not use chunked post

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 01:27:25 +02:00
Michael Niedermayer 094b3ce835 Merge commit 'e44ee1eb8db7393e9d43207c2e1812720e292e6d'
* commit 'e44ee1eb8db7393e9d43207c2e1812720e292e6d':
  movenc: Simplify code by using an existing local pointer

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 01:15:20 +02:00
Michael Niedermayer 20a66868a2 Merge commit 'dad12ce452a9d69c0d9d53c375003947d5f1b02e'
* commit 'dad12ce452a9d69c0d9d53c375003947d5f1b02e':
  movenc: Print a warning for an unhandled case of nonzero start dts with empty_moov

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 01:10:13 +02:00
Michael Niedermayer ca5a77191b Merge commit 'dbb472cb2f2f799295a12b4922a6a8be2cccfdee'
* commit 'dbb472cb2f2f799295a12b4922a6a8be2cccfdee':
  movenc: Write edit lists for fragmented files as well, if necessary

Conflicts:
	libavformat/movenc.c

The default for writing EDTS for fragmented mp4 is left at disabled
this can be overridden via command line with -use_editlist
but EDTS + fragments still does not fully work, which is why it is
left disabled by default

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13 01:02:36 +02:00
Michael Niedermayer 687cc836ea Merge commit '95ee4e2ce774e0339632d067161596bf3dadfc72'
* commit '95ee4e2ce774e0339632d067161596bf3dadfc72':
  movenc: Add some comments explaining subtle details in writing the edit lists

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-12 22:48:49 +02:00
Michael Niedermayer 031285dedf Merge commit '72f801619a1ae91969fee9a7d72519422433c998'
* commit '72f801619a1ae91969fee9a7d72519422433c998':
  movenc: Adjust edit lists to trim out parts of tracks with negative pts

Conflicts:
	libavformat/movenc.c

See: 66b45d8f7a
See: 14fd34d73b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-12 22:39:17 +02:00
Michael Niedermayer 5afe1233c5 Merge commit '8bef43388132b53f59a6e90add18900a3bb4cc60'
* commit '8bef43388132b53f59a6e90add18900a3bb4cc60':
  smoothstreamingenc: Simplify code by removing a redundant variable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-12 22:29:47 +02:00
Mark McGough 76c70e33d2 icecast: Do not use chunked post
Icecast uses HTTP 1.0 while Libav uses HTTP 1.1 and enables by
default chunked post.

Icecast actually forwards the HTTP chunk headers to the listener
as part of the media stream (without the chunk encoding HTTP headers)
causing the players to lose sync.

Disabling the option is enough to feed icecast properly.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-10-12 19:54:07 +02:00
Martin Storsjö e44ee1eb8d movenc: Simplify code by using an existing local pointer
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-12 17:48:09 +03:00
Martin Storsjö dad12ce452 movenc: Print a warning for an unhandled case of nonzero start dts with empty_moov
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-12 17:46:56 +03:00
Martin Storsjö dbb472cb2f movenc: Write edit lists for fragmented files as well, if necessary
This is necessary to get the right timestamp offset for content
that starts with dts != 0.

This currently only helps when writing fragmented files with a non-empty
moov atom. When writing an empty moov atom, we don't have any packets
yet, so we don't know the starting dts for the tracks.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-12 17:46:31 +03:00
Martin Storsjö 95ee4e2ce7 movenc: Add some comments explaining subtle details in writing the edit lists
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-12 17:46:01 +03:00
Michael Niedermayer 72f801619a movenc: Adjust edit lists to trim out parts of tracks with negative pts
This makes sure that audio preroll for e.g. AAC is signaled correctly.

Previously we only wrote the edit list correctly if we had negative
dts but started with pts == 0 (e.g. for video with B-frames).

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-12 17:45:55 +03:00
Martin Storsjö 8bef433881 smoothstreamingenc: Simplify code by removing a redundant variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-12 17:42:42 +03:00
Michael Niedermayer bd239c9a2e lavf: Don't drop both pts and dts if timestamps are invalid
In these cases, only drop dts. Because if we drop both we have no
timestamps at all for some files.

This improves playback of HLS streams from GoPro cameras.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-12 01:32:52 +03:00
Michael Niedermayer ae17a0c258 Merge commit '1d4579e38ecad578c86516fad2837a273d11b320'
* commit '1d4579e38ecad578c86516fad2837a273d11b320':
  tcp: Add AVOption support

Conflicts:
	libavformat/tcp.c

See: 2e009c6042
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-11 00:39:01 +02:00
Clément Bœsch 937aac4f97 avformat/assenc: make sure we crawl extradata only if it's non-null 2014-10-10 23:49:38 +02:00
Michael Niedermayer d246397161 Merge commit 'cd9d6399fd00f5aeacaa90cdc0b74c3570024119'
* commit 'cd9d6399fd00f5aeacaa90cdc0b74c3570024119':
  tls: Support passing old-style tcp options

See: 4f4eb380f0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 22:28:49 +02:00
Michael Niedermayer 76d1ffffd0 Merge commit '3df8d52fcdc9036b4074fdc612d487ece8bb5b7f'
* commit '3df8d52fcdc9036b4074fdc612d487ece8bb5b7f':
  rtsp: Add rtsps to the probe

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 21:36:27 +02:00
Michael Niedermayer 7028475f75 Merge commit 'c839b0439f0b01c72a6d253920d2e342b30f8bcb'
* commit 'c839b0439f0b01c72a6d253920d2e342b30f8bcb':
  rtsp: Support tls when in listen mode

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 21:29:10 +02:00
Michael Niedermayer c9791925a1 Merge commit '8b2e9636c57b22582143467a8a06b509b47b92f9'
* commit '8b2e9636c57b22582143467a8a06b509b47b92f9':
  rtsp: Support tls-encapsulated RTSP

Conflicts:
	libavformat/rtsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 21:18:41 +02:00
Michael Niedermayer 544f811453 Merge commit 'c27328e749ff3be648411765cd17362fee017341'
* commit 'c27328e749ff3be648411765cd17362fee017341':
  rtsp: Check for command strings without spaces

Conflicts:
	libavformat/rtspdec.c

See: a0568ed254
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 21:05:49 +02:00
Michael Niedermayer cec7afd036 Merge commit '09e1ccc8cddc946da5e10841f10dc5ebdd187d9d'
* commit '09e1ccc8cddc946da5e10841f10dc5ebdd187d9d':
  sctp: Use AVERROR_BUG instead of abort()

Conflicts:
	libavformat/sctp.c

See: 2e59142fa9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 20:51:52 +02:00
Michael Niedermayer fc6aa30459 Merge commit 'eb4f9069002e73648f6640cd054fc814cfda75b8'
* commit 'eb4f9069002e73648f6640cd054fc814cfda75b8':
  lavf: More informative error message

Conflicts:
	libavformat/mux.c

See: 30ced7e69f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 20:38:51 +02:00
Benoit Fouet 5e6fd132ff avformat/movenc: add EAC3 muxing support.
Support only one independent substream right now, and only syncframes
containing 6 blocks.

Fixes part of ticket #3074

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 19:07:08 +02:00
Luca Barbato 1d4579e38e tcp: Add AVOption support 2014-10-10 16:29:07 +02:00
Luca Barbato cd9d6399fd tls: Support passing old-style tcp options
Make tcp and tls urls near-interchangeable.
2014-10-10 16:29:07 +02:00
Luca Barbato 3df8d52fcd rtsp: Add rtsps to the probe 2014-10-10 16:29:06 +02:00
Luca Barbato c839b0439f rtsp: Support tls when in listen mode 2014-10-10 16:29:06 +02:00
Luca Barbato 8b2e9636c5 rtsp: Support tls-encapsulated RTSP 2014-10-10 16:29:06 +02:00
Luca Barbato c27328e749 rtsp: Check for command strings without spaces
Prevent a NULL-pointer dereference.

CC: libav-stable@libav.org
2014-10-10 16:29:06 +02:00
Luca Barbato 09e1ccc8cd sctp: Use AVERROR_BUG instead of abort()
Trying to write to a stream id larger the the maximum requested is
a programming error, still there is no reason to leave a
reachable abort() in the codebase.

CC: libav-stable@libav.org
2014-10-10 16:29:06 +02:00
Luca Barbato eb4f906900 lavf: More informative error message
Print the timestamp values and not just the stream index.
2014-10-10 16:29:06 +02:00
Michael Niedermayer e96fb980dc avformat/format: move mime_type_opt declaration to where its used
also remove a related dead store

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 03:08:11 +02:00
Michael Niedermayer 27123a77c1 avformat/os_support: include unistd.h before defining lseek to lseek64 on android
fixes build failure

Found-by: James Almer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-10 02:32:32 +02:00