This makes the function accept the format of creation_time
as output by demuxers (e.g. the mov demuxer), making the
creation timestamp stay intact if transcoding.
Signed-off-by: Martin Storsjö <martin@martin.st>
This function is used in muxers for parsing the 'creation_time'
metadata key, for converting it to a time value.
This makes it match the behaviour of the exported 'creation_time'
metadata from demuxers, where it is in UTC, too.
Signed-off-by: Martin Storsjö <martin@martin.st>
Converting to double before the multiplication rather than after
avoids an integer overflow in some cases.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This is to make developers aware of the fact that they will
start using the new init function at some point.
Signed-off-by: Martin Storsjö <martin@martin.st>
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Martin Storsjö <martin@martin.st>
This fixes false positives of has_codec_delay_been_guessed() for
streams where not every input picture generates an output picture,
such as interlaced H264.
On the first iteration through this code, last_dts is always
INT64_MIN (AV_NOPTS_VALUE) and the subtraction overflows in
an invalid manner. Although the result is only used if the
input values are valid, performing the subtraction is still
not allowed in a strict environment.
Signed-off-by: Mans Rullgard <mans@mansr.com>
This patch also introduces CODEC_ID_CELT.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
If the demuxer did not set a codec_tag, there is none and
inventing one makes no sense. This change stops the rawvideo
"decoder" over-writing user-supplied pixfmt with one derived
from the codec_tag. The pixfmt-codec_tag-pixfmt round-trip
is lossy since several pixfmts map to the same codec_tag.
This fixes fate-lavf-pixfmt with avfilter disabled.
Signed-off-by: Mans Rullgard <mans@mansr.com>
av_open_input_stream used to allow this, even though it makes no sense.
Make it just print a warning instead of failing, thus restoring
compatibility.
Note that avformat_open_input() will still reject this combination.
Signed-off-by: Anton Khirnov <anton@khirnov.net>