Commit Graph

17195 Commits

Author SHA1 Message Date
Michael Niedermayer
19321a295a avformat/utils: Terminate SPS in avci100_1080i_extradata to avoid warnings during parsing
Fixes: AVCI100_Test.mxf
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 18:20:40 +01:00
Jochen Strunk
0276b95242 avformat/mov: check color parameter type explicitly.
Fixes ticket #4387.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Note, Vittorio Giovara had submitted a very similar fix to me privately
a few hours before this, iam applying Jochens because it comes with a
commit message too and i had not yet applied Vittorios, but For sake
of credit, Vittorio independently solved this first
2015-03-24 14:06:03 +01:00
Michael Niedermayer
4a6096e481 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  lavf/matroskaenc: List subtitle codecs with fake codec_tags to allow remuxing.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 12:47:18 +01:00
Michael Niedermayer
153073201c Merge commit 'a8c99205ca8703bd849efae13fcf844315c7147d'
* commit 'a8c99205ca8703bd849efae13fcf844315c7147d':
  avisynth: Fix compilation against current 2.6 header(s).

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 11:40:12 +01:00
Stephen Hutchinson
a8c99205ca avisynth: Fix compilation against current 2.6 header(s).
AviSynth 2.6 (and by extension, AviSynth+) moves these functions
into AVSC_API. This requires both adjusting their normal use,
and for AvxSynth, adjusting the position/use of the USING_AVISYNTH
ifdefs.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-24 10:31:04 +01:00
Carl Eugen Hoyos
b76df6efb6 lavf/matroskaenc: List subtitle codecs with fake codec_tags to allow remuxing.
Fixes remuxing of DVBSUB to mkv.
2015-03-24 10:07:18 +01:00
Michael Niedermayer
dfea1acb21 Merge commit 'e4fe535d12f4f30df2dd672e30304af112a5a827'
* commit 'e4fe535d12f4f30df2dd672e30304af112a5a827':
  mov: Write the display matrix in order

Conflicts:
	libavformat/mov.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 01:14:31 +01:00
Mark Reid
001b28b021 libavformat/mxfenc: add container duration and package name to primer pack
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 22:09:46 +01:00
Vittorio Giovara
e4fe535d12 mov: Write the display matrix in order
This will allow to copy the matrix as is and it is just cleaner to keep
the matrix in the same order specified by the mov standard (which is
also explicitly described in the documentation).

In order to preserve compatibility, flip the angle sign in the display API
av_display_rotation_set() and av_display_rotation_get(), and improve the
documentation mentioning the rotation direction.
2015-03-23 20:53:28 +00:00
Michael Niedermayer
ad3c5ff347 Merge commit 'e0046bc9c96150fa06146ace9093f06857dd7b23'
* commit 'e0046bc9c96150fa06146ace9093f06857dd7b23':
  movenc: Write the make and model metadata keys for mov style files

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-23 20:33:09 +01:00
Martin Storsjö
e0046bc9c9 movenc: Write the make and model metadata keys for mov style files
These are essential allowing QuickTime to keep detecting content
as slow-motion - this allows preserving them on stream copy.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-23 12:43:35 +02:00
Michael Niedermayer
14bc7aaa86 Revert "avformat/flvenc: Allow muxing video codecs which are not explicitly supported by the muxer"
This commit has no known use case ATM as there are no unsupported video codecs in flv and could
theoretically be use to generate broken files allthough that would be not entirely easy as
tags/codecs still get sanity checked

This reverts commit 76f4b11780.
2015-03-22 17:19:25 +01:00
Michael Niedermayer
76f4b11780 avformat/flvenc: Allow muxing video codecs which are not explicitly supported by the muxer
This allows stream copying video codecs before they are explicitly
supported. The same feature was in the past useful for audio codecs
in flv

This partly reverts the changes from 735ab7c5e0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-22 16:20:14 +01:00
Michael Niedermayer
c75681aba3 Merge commit '93c1b04abfc0dd31211a18bf2c0041d69cd16919'
* commit '93c1b04abfc0dd31211a18bf2c0041d69cd16919':
  mms: Check memory allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-22 03:52:37 +01:00
Federico Tomassetti
93c1b04abf mms: Check memory allocation
Bug-Id: CID 1258462

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-21 23:18:15 +01:00
Federico Tomassetti
27aa1ff35a oggdec: Check memory allocation
Bug-Id: CID 1257798 / CID 1257805

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-21 23:18:15 +01:00
Federico Tomassetti
d3aa307da0 rmenc: Check memory allocation
Bug-Id: CID 1257832

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-21 23:18:14 +01:00
Michael Niedermayer
3c5c6870a7 avformat/movenc: avoid using uninitialized display_matrix_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 00:24:31 +01:00
Michael Niedermayer
50255b7a86 Merge commit '342fc46c69199b076b7c210f42208ce39a2bde1c'
* commit '342fc46c69199b076b7c210f42208ce39a2bde1c':
  cmdutils: Add a stream specifier to map usable streams

Conflicts:
	cmdutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-20 20:15:40 +01:00
Michael Niedermayer
750cf4e537 Merge commit 'cf18e777aed9f73011c7ab7cbab8003189d4b9d8'
* commit 'cf18e777aed9f73011c7ab7cbab8003189d4b9d8':
  movenc: write the display transform matrix

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-20 01:10:06 +01:00
Anton Khirnov
cf18e777ae movenc: write the display transform matrix 2015-03-19 21:02:59 +01:00
Michael Niedermayer
bbcc09518e avformat/avienc: Expand master ODML index when its end is reached
Fixes 256Gb limit
Fixes Ticket4225

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 18:17:16 +01:00
Michael Niedermayer
adfde9a646 avformat/avienc: Fix wrongly placed comment
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 17:30:28 +01:00
Michael Niedermayer
81a6b075bd avformat/avidec: also print frame_num in debug output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 16:36:29 +01:00
Michael Niedermayer
01775c8858 avformat/avienc: factor out update_odml_entry()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 16:33:50 +01:00
Michael Niedermayer
c3a6d179fb avformat/avienc: factor write_odml_master() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 16:33:49 +01:00
Michael Niedermayer
b5448e66b0 Merge commit '67a2912307c3c08f2725ccae162cfe3426b80184'
* commit '67a2912307c3c08f2725ccae162cfe3426b80184':
  movenc: Don't assume that fragment durations in pts is equal to duration in dts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 13:38:25 +01:00
Michael Niedermayer
25d7e3ad59 Merge commit '5c337353a2546416631a87de4881850d99141c39'
* commit '5c337353a2546416631a87de4881850d99141c39':
  movenc: Move sidx edit list timestamp adjustment into a block

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 13:26:47 +01:00
Michael Niedermayer
3602782429 Merge commit 'eee13d653953083553cceadbbedf6222ef78a006'
* commit 'eee13d653953083553cceadbbedf6222ef78a006':
  movenc: Only adjust the cts offset at the start of fragments if necessary

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 12:47:19 +01:00
Michael Niedermayer
4631d4bec3 Merge commit '5cf892d6946b19a87bcd00d6b76ce81f45960fdb'
* commit '5cf892d6946b19a87bcd00d6b76ce81f45960fdb':
  movenc: Write pts timestamps in tfxd, instead of dts timestamps

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 12:38:51 +01:00
Michael Niedermayer
00ad3432e1 Merge commit 'b81b0cc22b22413760423e239ea644c9afdbfa2d'
* commit 'b81b0cc22b22413760423e239ea644c9afdbfa2d':
  movenc: Set the last packet duration based on the next packet when autoflushing

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 12:38:29 +01:00
Michael Niedermayer
09585e377c Merge commit '3041183677bda0a431b36e96a2c76617abaa8183'
* commit '3041183677bda0a431b36e96a2c76617abaa8183':
  dashenc: Heuristically fill in the duration of packets that need it

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 12:18:05 +01:00
Michael Niedermayer
76fef5cd27 Merge commit '2889c5e16711770437f380f1bead5f72c6a0b17a'
* commit '2889c5e16711770437f380f1bead5f72c6a0b17a':
  movenc: Heuristically set the duration of the last sample in a fragment if not set

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 12:09:51 +01:00
Michael Niedermayer
4f8540ba40 Merge commit '8dc72eeaf647736c287b59a3856a11904bedd58b'
* commit '8dc72eeaf647736c287b59a3856a11904bedd58b':
  udp: Fix crashes after adding AVOptions

See: aefed6ca87
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 11:22:39 +01:00
Martin Storsjö
67a2912307 movenc: Don't assume that fragment durations in pts is equal to duration in dts
For strict CFR, they should be pretty much equal, but if the stream
is VFR, there can be a sometimes significant difference.

Calculate the pts duration separately, used in sidx atoms and for
tfrf/tfxd boxes in smooth streaming ismv files.

Also make sure to reduce the duration of sidx entries according to
edit lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:20 +02:00
Martin Storsjö
5c337353a2 movenc: Move sidx edit list timestamp adjustment into a block
When reading these values from track->frag_info, the same adjustment
has already been done.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:17 +02:00
Martin Storsjö
eee13d6539 movenc: Only adjust the cts offset at the start of fragments if necessary
Adjusting it is only necessary when a sidx/tfrf/tfxd atom already has
been written for the previous fragment (since the sidx/tfrf/tfxd atoms
include the duration between the first pts of the previous fragment, to
the first pts of the new fragment).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:15 +02:00
Martin Storsjö
5cf892d694 movenc: Write pts timestamps in tfxd, instead of dts timestamps
This matches what we write in tfra and tfrf since 9cbf70fa0e.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:12 +02:00
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
Andreas Cadhalpun
b61cb61ab8 mxfenc: don't try to write footer without header
This fixes a crash, when trying to mux h264 into mxf_opatom.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Previous version reviewed-by: tomas.hardin@codemill.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 02:20:30 +01:00
Michael Niedermayer
c5c09501f9 avformat/aiffdec: do not fail if header parser hits EOF
Based on patch by Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 01:44:14 +01:00
Michael Niedermayer
ae81e8a9c5 avformat/aiffdec: Stop header parsing once a non header packet is reached
Fix Ticket3530

Based-on debuging work by Martin Vignali <martin.vignali@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-19 01:39:47 +01:00
Michael Niedermayer
ee648903f5 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  lavf/mkv: Ignore ff_isom_write_hvcc() return value as the mov muxer does.
  lavc/dts: Do not set bitrate for DTS-HD Master and High Resolution.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-18 21:24:35 +01:00
Michael Niedermayer
b3818c47d8 Merge commit '8692d74b7364b405d7939c0ed347e8a2815193a7'
* commit '8692d74b7364b405d7939c0ed347e8a2815193a7':
  mov: Add option to keep exact packet sequence after seeking

Conflicts:
	libavformat/isom.h
	libavformat/mov.c
	libavformat/version.h

See: 414d6547f3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-18 21:15:18 +01:00
Carl Eugen Hoyos
7a5356c728 lavf/mkv: Ignore ff_isom_write_hvcc() return value as the mov muxer does.
This change allows remuxing hevc from mpeg-ts to Matroska.
2015-03-18 20:35:26 +01:00
Micah Galizia
c59654d67d avformat/http: replace cookies with updated values instead of appending forever
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-18 19:53:26 +01:00
Derek Buitenhuis
414d6547f3 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:30:07 +00:00