Commit Graph

10028 Commits

Author SHA1 Message Date
Joakim Roubert 55f03d8726 hlsenc: Add parameter -hls_allow_cache
The -hls_allow_cache parameter enables explicitly setting the
EXT-X-ALLOW-CACHE tag in the manifest file. That tag indicates
whether the client MAY or MUST NOT cache downloaded media
segments for later replay.

Valid values are 1 (=YES) or 0 (=NO) and the EXT-X-ALLOW-CACHE
will not show in the manifest for other values (or if
-hls_allow_cache is not used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-03 20:20:28 +03:00
Justin Ruggles 19133e96d3 lavf: fix memleaks in avformat_find_stream_info()
When AVFMT_FLAG_NOBUFFER is set, the packets are not added to the
AVFormatContext packet list, so they need to be freed when they are
no longer needed.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-09-29 17:54:25 +00:00
Timothy B. Terriberry a05f5052fe sdp: Make opus declaration conform to the spec
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-29 13:48:42 +03:00
Andreas Cadhalpun 883e98bc25 probe: Bump the score for mime type matching
It should be more trustworthy than extension matching.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-26 20:56:16 +02:00
Diego Biurrun 4d5b99dacd caf: Give context structure a consistent name 2014-09-26 00:44:41 -07:00
Gabriel Dume 4620affa24 m4vdec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-25 01:58:51 -07:00
Gabriel Dume 86a361081d lmlm4: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-25 01:44:32 -07:00
Gabriel Dume 95d312d6c8 concat: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-25 01:44:31 -07:00
Martin Storsjö 2f172f1ae9 rtsp: Clear the session id on redirects
This fixes handling redirects in case the server provided a session
id within the redirect reply.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-24 23:34:02 +03:00
Thomas Volkert ddf5fb71ee rtpenc: HEVC/H.265 support
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-24 23:33:26 +03:00
Martin Storsjö a2efbecc4e libavformat: Move avc mp4 startcode parsing to a shared file
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-24 23:33:17 +03:00
Vittorio Giovara c463dfc7e4 rtpdec_hevc: Drop a duplicated, nonstandard entry
The RFC spec draft only specifies the "H265" name - there is no
specification saying how to interpret "HEVC" (if such a packet
format is specified it could be an entirely different format).

Since this is a very new standard (still a draft), there is little
need for compatibility with existing, broken implementations. Therefore
remove the extra alias, to avoid the risk of encouraging incorrect
usage.

Intentionally keeping the ff_hevc_dynamic_handler name for the
handler, to use "hevc" consistently as name for the codec instead
of "h265" within the library internals as long as there only is one
single variant in actual use.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-24 10:44:14 +03:00
Martin Storsjö 2bb2c2bd75 rtpenc_chain: Pass the initial time_base hint on to the chained muxer
In practice this hint is ignored - the rtp muxer always overwrites
the stream time base without taking the hint into account. But as
a general practice this is the correct way to pass a time base hint
on to a chained muxer.

This avoids warnings about using the codec time base as hint
being deprecated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-17 22:53:27 +03:00
Katerina Barone-Adesi c5560e72d0 apetag: Fix APE tag size check
The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

CC: libav-stable@libav.org
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-17 06:37:05 -07:00
Martin Storsjö 803e82276b libavformat: Check mkdir return error codes
Previously, the returned error codes were intentionally ignored
(see fadd3a6821), to avoid aborting if the directory already
existed. If the mkdir actually failed, this was caught when
opening files within the directory fails anyway.

By handling the error code here (but explicitly ignoring EEXIST),
the error messages and return codes in these cases are more
appropriate and less confusing.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-09-07 23:20:29 +03:00
Diego Biurrun 4d55e9de27 vc1: Split bits used in libavformat into a separate header
This reduces inter-library dependencies.
2014-09-04 07:11:03 -07:00
Thomas Volkert 95e177eeb2 rtpdec: HEVC/H.265 support
As specified in draft-ietf-payload-rtp-h265-06.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-09-03 02:39:24 +02:00
Luca Barbato 7968059e5c mpegts: Allow custom max resync size 2014-09-03 02:38:03 +02:00
Vittorio Giovara 4d686fb721 matroskaenc: convert avstream stereo3d side data during encoding
Write the StereoMode Embl to bitstream.
2014-08-28 12:35:27 -04:00
Vittorio Giovara d4ae8ac92f matroskadec: parse stereo mode on decoding
Convert the Matroska stereo format to the Stereo3D format, and add a
Stereo3D side data to the stream.

Bump the doctype version supported.

Bug-Id: 728 / https://bugs.debian.org/757185
2014-08-28 12:33:26 -04:00
Vittorio Giovara 9301486408 avcodec: add stream-level stereo3d side data 2014-08-28 12:33:26 -04:00
Vittorio Giovara f2583bc86e matroska: list supported extensions 2014-08-28 12:33:25 -04:00
Anton Khirnov 75bbaf2493 mpegenc: limit the maximum muxrate
It is written to the file as a 22-bit value.

CC: libav-stable@libav.org
2014-08-27 06:21:54 +00:00
Diego Biurrun 4c8bd8ddb0 os_support: Adjust an outdated #endif comment 2014-08-26 06:34:41 -07:00
Luca Barbato 4e9e6fa99f mpeg: Write H264 streams at offset 2
It hints that the content is H264 according to HD-DVD.
2014-08-26 03:43:13 +02:00
Rémi Denis-Courmont 6ee1cb5740 libavformat: use MSG_NOSIGNAL when applicable
If the remote end of a connection oriented socket hangs up, generating
an EPIPE error is preferable over an unhandled SIGPIPE signal.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-25 10:49:14 +03:00
Anton Khirnov b263f8ffe7 lavf: add AVFormatContext.max_ts_probe
It allows to configure how long will avformat_find_stream_info() wait
to get the first timestamp.
2014-08-25 05:17:54 +00:00
Luca Barbato f9f34cb998 ogg: Use separate classes for the aliases
Unbreak 051aadeed1
2014-08-23 02:42:18 +02:00
Diego Biurrun 1019b7c4ed os_support: Undefine lseek/stat/fstat before defining them
This avoids a number of redefinition warnings on MinGW64.
2014-08-22 18:35:19 +02:00
Luca Barbato 051aadeed1 ogg: Provide aliases for Speex, Opus and audio-only ogg
Since they are aliases for ogg enabling any of them enables ogg as well.
2014-08-22 13:23:50 +02:00
Anton Khirnov cb7b1a2dfb electronicarts: set the framerate for TGQ/TQI
It is hardcoded to 15fps.
2014-08-22 11:15:20 +00:00
Anton Khirnov 7b6aae23e1 electronicarts: read the framerate for MAD 2014-08-22 11:15:20 +00:00
Anton Khirnov 4d6c515284 electronicarts: do not fail on zero-sized chunks
At least one FATE sample contains such chunks and happens to work simply
by accident (due to find_stream_info() swallowing the error).

CC: libav-stable@libav.org
2014-08-22 11:15:20 +00:00
Nidhi Makhijani 13c90bc9a3 adts: Return more meaningful error codes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-21 04:25:48 -07:00
Diego Biurrun 86dfcfd0e3 mov: Drop unused parameter from ff_mov_read_esds()
This is cleaner and avoids an uninitialized variable warning with MSVC.
2014-08-19 06:22:07 -07:00
Luca Barbato 369380e1c4 mxf: Support AAC
Update mxf_set_audio_pts to use the container-provided information.

The UL is marked as "to be changed in the future", but the current
samples in the wild do use it.
2014-08-17 16:11:16 +02:00
Luca Barbato 747cd9560c mxf: Add the UL for the MPEG2VideoDescriptor 2014-08-17 16:11:02 +02:00
Luca Barbato 304089aca7 mxf: Add UID print helpers
And use it to print non-parsed ULs.
2014-08-17 16:11:02 +02:00
Gabriel Dume 4b1f5e5090 cosmetics: Write NULL pointer inequality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 05:34:13 -07:00
Gabriel Dume f929ab0569 cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 03:18:18 -07:00
Diego Biurrun 7ccb847f0f http: Reduce scope of a variable in parse_content_encoding()
Also fixes an unused variable warning with zlib disabled.
2014-08-15 09:37:38 +02:00
Nidhi Makhijani 0528226a05 a64: Return correct error code on invalid data stream
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-14 01:22:47 -07:00
Luca Barbato e8049af132 mpegts: Do not try to write a PMT larger than SECTION_SIZE
Prevent out of array writes.

Similar to what Michael Niedermayer did to address the same issue.

Bug-Id: CVE-2014-2263
CC: libav-stable@libav.org

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-13 12:43:26 -07:00
Anton Khirnov 30e50c5027 lavf: eliminate ff_get_audio_frame_size()
It is basically a wrapper around av_get_audio_frame_duration(), with a
fallback to AVCodecContext.frame_size. However, that field is set only
when the stream codec context is actually used for encoding or decoding,
which is discouraged.

For muxing, it is generally the responsibility of the caller to set the
packet duration.
For demuxing, if the duration is not stored at the container level, it
should be set by the parser.

Therefore, removing the frame_size fallback should not break any
important case.
2014-08-13 17:41:11 +00:00
Martin Storsjö 4e629ef80e http: Fix authentication, broken since 6a463e7fb
The cur_*auth_type variables were set before the http_connect call
prior to 6a463e7fb - their sole purpose is to record the
authentication type used to do the latest request, since parsing
the http response sets the new type in the auth state.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-08-13 20:22:28 +03:00
Andrew Stone db68ef898a ogg: update event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
Originally, AVFormatContext and a metadata dict were provided to ff_vorbis_comment(),
but this presented issues if an AVStream was being updated or the metadata on
AVFormatContext wasn't actually being updated. To remedy this, ff_vorbis_stream_comment()
explicitly updates a stream's metadata and sets any necessary flags.

ff_vorbis_comment() does not modify any flags, and any calls to it that update
AVFormatContext's metadata (just a single call) must also update
AVFormatContext.event_flags after detecting any metadata changes to the provided
dictionary, as signaled by a positive return value.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:25:19 +00:00
Andrew Stone cc3e88a2b9 mov: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:24:09 +00:00
Andrew Stone fa3a5dd4de nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:23:36 +00:00
Andrew Stone 0f789322ef flvdec: update AVFormatContext.event_flags with METADATA_UPDATED whenever metadata changes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:23:28 +00:00
Andrew Stone 93c04e095d Expose metadata found in onCuePoint events in .flv files.
Currently, only onMetaData is used, but some providers (wrongly)
put metadata into onCuePoint events, and it's still nice to be
able to use that data.

onCuePoint events also present metadata slightly differently than
onMetaData events: all metadata is found inside an object called
"parameters". In order to extract this metadata, it's easiest to
recurse through the object tree and pull out anything found in
child objects and put it in the top-level metadata.

Reference: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/2/help.html?content=00001404.html

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:11:43 +00:00