Commit Graph

10877 Commits

Author SHA1 Message Date
Mark Harris
4d13bcceb9 sdp: fix opus sprop-stereo fmtp syntax
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-01 08:56:36 +02:00
Anton Khirnov
3e8fd93b6a lavf: add a missing bump and APIchanges for the codecpar switch 2016-02-26 09:14:13 +01:00
Vittorio Giovara
fa55addd23 img2: Drop av_ prefix for a static function
This prefix is reserved for public functions only.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-02-24 13:56:46 -05:00
Anton Khirnov
9200514ad8 lavf: replace AVStream.codec with AVStream.codecpar
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.

In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.

There are multiple important problems with this approach:
    - the fields in AVCodecContext are in general one of
        * stream parameters
        * codec options
        * codec state
      However, it's not clear which ones are which. It is consequently
      unclear which fields are a demuxer allowed to set or a muxer allowed to
      read. This leads to erratic behaviour depending on whether decoding or
      encoding is being performed or not (and whether it uses the AVStream
      embedded codec context).
    - various synchronization issues arising from the fact that the same
      context is used by several different APIs (muxers/demuxers,
      parsers, bitstream filters and encoders/decoders) simultaneously, with
      there being no clear rules for who can modify what and the different
      processes being typically delayed with respect to each other.
    - avformat_find_stream_info() making it necessary to support opening
      and closing a single codec context multiple times, thus
      complicating the semantics of freeing various allocated objects in the
      codec context.

Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Anton Khirnov
ec4c483976 lavf: add a protocol whitelist/blacklist for file opened internally
Should make the default behaviour safer for careless callers that open
random untrusted files.

Bug-Id: CVE-2016-1897
Bug-Id: CVE-2016-1898
2016-02-22 11:48:30 +01:00
Anton Khirnov
8c0ceafb0f urlprotocol: receive a list of protocols from the caller
This way, the decisions about which protocols are available for use in
any given situations can be delegated to the caller.
2016-02-22 11:45:31 +01:00
Anton Khirnov
cae448cfbf aviobuf: add a private data struct for avio_open()ed contexts
It will be useful in the following commits.
2016-02-22 11:36:47 +01:00
Anton Khirnov
832a202c47 protocols: make the list of protocols static
Disallow other code to touch it directly, now it's only accessible
through a blacklisting/whitelisting function.
2016-02-22 11:35:57 +01:00
Anton Khirnov
7d61dc95d7 lavf: move urlcontext_child_class_next() to protocols.c
It needs to access the list of protocols directly, so it more properly
belongs there.
2016-02-22 11:35:52 +01:00
Anton Khirnov
0fa00d0591 lavf: move avio_enum_protocols() to protocols.c
It's a more appropriate place for it.
2016-02-22 11:35:46 +01:00
Anton Khirnov
2758cdedfb lavf: reorganize URLProtocols
Instead of a linked list constructed at av_register_all(), store them
in a constant array of pointers.

Since no registration is necessary now, this removes some global state
from lavf. This will also allow the urlprotocol layer caller to limit
the available protocols in a simple and flexible way in the following
commits.
2016-02-22 11:30:58 +01:00
Anton Khirnov
225e84e745 hls: disallow opening nested files in child demuxers 2016-02-22 11:30:33 +01:00
Anton Khirnov
e192cd9ce2 smoothstreamingenc: do not open the files as read+write
They are only written to, never read.
2016-02-22 11:30:24 +01:00
Anton Khirnov
d082078a88 dashenc: eliminate ffurl_* usage
Now all IO should go through the IO callbacks and be interceptable by
the caller.
2016-02-22 11:29:00 +01:00
Anton Khirnov
7fbb3b5b98 lavf: use the io_open callbacks for files opened from open_input() as well
There is no real reason to treat them differently.
2016-02-22 11:28:35 +01:00
Anton Khirnov
dc6527ed90 nutenc: do not use AVCodecContext.frame_size
It will in general not be available. Use block_align if known or fall
back to av_get_audio_frame_duration().
2016-02-22 11:28:00 +01:00
Luca Barbato
bf7be043fc matroska: Always consider S_TEXT/UTF8 as SRT when demuxing
Reported-By: Maxim Koitsov <maksbotan@gentoo.org>
2016-02-22 09:40:16 +01:00
Diego Biurrun
8d918a98aa rtpdec: Use the right logging context 2016-02-19 20:38:18 +01:00
Luca Barbato
f273f7fb25 mkv: Force the full parsing of mp3
Some muxer might or might not fit incomplete mp3 frames in
their packets.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-19 17:35:33 +01:00
Luca Barbato
3ef98937f5 mov: Force the full parsing of mp3
Some muxer might or might not fit incomplete mp3 frames in
their packets.

Bug-Id: 899

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-19 17:35:26 +01:00
Diego Biurrun
0d1229f1d2 voc: Split ff_voc_get_packet into a separate file 2016-02-18 15:35:46 +01:00
Diego Biurrun
624e235502 build: Introduce iso_media component 2016-02-18 15:35:46 +01:00
Diego Biurrun
82454c3a82 build: Let the WTV demuxer select the MPEG-TS demuxer
The WTV demuxer depends on large parts of the MPEG-TS demuxer internals
anyway and fails to build without it.
2016-02-18 15:35:45 +01:00
Diego Biurrun
29c2d06d67 cosmetics: Drop empty comment lines 2016-02-18 15:35:30 +01:00
Vittorio Giovara
b92962436b mov: Fix the format specifier type for size
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-16 18:25:47 +01:00
Luca Barbato
5eb562831b mov: Use the correct type for size
An AVIO offset is int64_t.

Bug-Id: 921
2016-02-14 11:44:38 +01:00
Luca Barbato
e579d8b29c lavf: Dump the cpb side data information 2016-02-13 14:03:52 +01:00
Andreas Cadhalpun
2e6ba1993e asfdec: make sure packet_size is non-zero before seeking
This fixes infinite loops due to seeking back.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-07 03:12:33 +01:00
Andreas Cadhalpun
bf50607ab7 asfdec: check for too small size in asf_read_unknown
This fixes infinite loops due to seeking back.

Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-07 03:12:33 +01:00
Andreas Cadhalpun
e4d1621c6e asfdec: check avio_skip in asf_read_simple_index
The loop can be very long, even though the file is very short.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-07 03:12:33 +01:00
Andreas Cadhalpun
a32dbf2aed asfdec: break if EOF is reached after asf_read_packet_header
asf_read_payload can unset eof_reached, so check it also before calling
that function.

This fixes infinite loops.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-02-07 03:12:33 +01:00
Vittorio Giovara
e80307140f yuv4mpegenc: Use AV_CEIL_RSHIFT where needed 2016-01-25 12:02:44 -05:00
Anton Khirnov
81306fd4bd hls: eliminate ffurl_* usage
Now all IO should go through the IO callbacks and be interceptable by
the caller.
2016-01-24 16:50:13 +01:00
Anton Khirnov
9f61abc811 lavf: allow custom IO for all files
Some (de)muxers open additional files beyond the main IO context.
Currently, they call avio_open() directly, which prevents the caller
from using custom IO for such streams.

This commit adds callbacks to AVFormatContext that default to
avio_open2()/avio_close(), but can be overridden by the caller. All
muxers and demuxers using AVIO are switched to using those callbacks
instead of calling avio_open()/avio_close() directly.

(de)muxers that use the URLProtocol layer directly instead of AVIO
remain unconverted for now. This should be fixed in later commits.
2016-01-24 16:45:32 +01:00
Piotr Bandurski
55c7e5bf7c riff: add C210 FourCC (Canopus C210) 2016-01-21 15:33:19 -05:00
Piotr Bandurski
7c4059ae1e riff: add YUYV FourCC (Drastic YUYV) 2016-01-21 15:33:19 -05:00
Derek Buitenhuis
65d29dd274 mov: Add an option to toggle dref opening
This feature is mostly only used by NLE software, and is
both of dubious value being enabled by default, and a
possible security risk.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-21 14:32:39 +01:00
Martin Storsjö
e4eb13ca77 flvdec: Add sanity checking of the last packet size
For http, this avoids spurious warnings about failed requests (e.g.
HTTP error 416 Requested Range Not Satisfiable), if the last packet
is truncated and the size read is bogus.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-19 14:24:35 +02:00
Michael Niedermayer
09f4822e4e flvdec: perform duration search just once
When loading a truncated flv file, it would previously try to do a seek to
the end of every packet read. For some input protocols (such as http), such
repeated seek attempts are cripple the reading performance.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-01-19 14:24:34 +02:00
Andreas Cadhalpun
9cdddb93bb nutdec: only copy the header if it exists
Fixes runtime error: null pointer passed as argument 2, which is
declared to never be null

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-13 09:44:44 +01:00
Andreas Cadhalpun
5b83b24ccb nuv: sanitize negative fps rate
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-13 09:37:11 +01:00
Anton Khirnov
9cce011b1d movenc-test: stop setting the GLOBAL_HEADER codec flag
This test does no encoding, setting the flag was done just to silence
the warning removed in the previous commit.
2016-01-12 09:12:24 +01:00
Anton Khirnov
521dc78366 mux: drop the warning about global headers
The AVStream codec context is often not (and should not be) the actual
encoding context, so this warning will be spurious in many cases.
2016-01-12 09:12:24 +01:00
Clément Bœsch
7570c9e04f swfdec: support compressed swf
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-11 15:32:56 -05:00
Alexandra Hájková
34d45b3616 asfdec: Fix typo in comment
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-11 21:00:49 +01:00
Alexandra Hájková
066281372d asfdec: Remove unused function parameters
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Andreas Cadhalpun
2aec600ae7 asfdec: reject size > INT64_MAX in asf_read_unknown
Both avio_skip and detect_unknown_subobject use int64_t for the size
parameter.

This fixes a segmentation fault due to infinite recursion.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Andreas Cadhalpun
c69461d737 asfdec: only set asf_pkt->data_size after sanity checks
Otherwise invalid values are used unchecked in the next run.
This can cause NULL pointer dereferencing.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Diego Biurrun
69a68593ce Remove stray line breaks from avpriv_{report_missing_feature|request_samples} 2015-12-26 10:28:03 +01:00
Diego Biurrun
5049f6b772 rtpdec_jpeg: Coalesce redundant error checks 2015-12-26 10:26:29 +01:00
Stefan Pöschel
dbce017913 mpegtsenc: add flag to embed an AC-3 ES the DVB way
So far an AC-3 elementary stream is refered to in the PMT according to
System A (ATSC). However System B (DVB) has a different way to signal an AC-3
ES within the PMT. This different way can be enabled by a new flag. The flag is
more generally named 'system_b' as there are further differences between ATSC
and DVB (e.g. the signalling of E-AC-3) which should then also be covered by it
in the future.

Bug-Id: 73

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-14 15:16:33 +01:00
Anton Khirnov
5bc223b15d r3d: fix an invalid read introduced in 6bf4c1d 2015-12-14 12:12:42 +01:00
Martin Storsjö
64f8c439fd rtmpproto: Include the full path as app when "slist=" is found
This matches what librtmp does. This fixes automatic url parsing of
crunchyroll urls.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-12-13 23:23:06 +02:00
Anton Khirnov
9f0b6e6827 vocdec: do not create the stream in read_header()
The stream parameters are not known until we read a packet, so postpone
creating it until then.
2015-12-12 21:27:11 +01:00
Anton Khirnov
2d0432d918 vocdec: put the code not shared with other demuxers under appropriate ifdef 2015-12-12 21:26:55 +01:00
Anton Khirnov
09ae7b81ea flvdec: do not create any streams in read_header()
The current muxer behaviour is to create streams in read_header() based
on the audio/video presence flags, but fill in the stream parameters
later when we actually get some packets for them. This is rather shady,
since other demuxers set the stream parameters immediately when the
stream is created and do not touch the stream codec context after that.

Change the flv demuxer to behave in the same way as other similar
demuxers -- create the streams only when we get a packet for them.
2015-12-12 21:26:48 +01:00
Anton Khirnov
72d658766e mp3dec: replace avpriv_mpa_decode_header with avpriv_mpegaudio_decode_header
The latter does not require a full AVCodecContext and still provides all
the functionality needed here.
2015-12-12 21:26:00 +01:00
Anton Khirnov
955aec3c7c mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_header
Almost all the places from which this function is called already check
the header manually and in the two that don't (the mp3 muxer) the check
should not cause any problems.
2015-12-12 21:25:42 +01:00
Anton Khirnov
6bf4c1d711 r3d: do not create the audio stream until we know the sample rate 2015-12-12 21:20:33 +01:00
Anton Khirnov
9f1eccb97b ff_parse_specific_params: do not use AVCodecContext.frame_size
It will not be set unless the muxing codec context is also the encoding
context, which is discouraged. When the frame size is not known from
av_get_audio_frame_duration(), the fallback should still be good enough.
2015-12-12 21:19:50 +01:00
Anton Khirnov
1f008f34d5 rmenc: do not use AVCodecContext.frame_size
It will not be set if the stream codec context is not the encoding
context. Use av_get_audio_frame_duration() instead, it should work for
all audio codecs supported by the muxer.
2015-12-12 21:19:08 +01:00
Aaron Colwell
febfb49a70 matroskadec: Fix sample_aspect_ratio for stereo matroska content
matroskaenc applies divisors to the display width/height when generating
stereo content. This patch adds the corresponding multipliers to matroskadec
so that the original sample aspect ratio can be recovered.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-12-07 11:27:42 -05:00
Ganesh Ajjanagadde
d5f5c90be9 rtsp: free opts dictionary on failure of getnameinfo
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-12-07 11:11:31 +02:00
Ganesh Ajjanagadde
8df8f0c70c movenc-test: add a missing va_end call
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-12-07 11:11:30 +02:00
Anton Khirnov
b8b21dee0f mxfenc: always assume long gop
Checking the codec context parameters to find out this information is
far too unreliable to be useful, so it is safer to assume B-frames are
always present.
2015-12-06 10:28:36 +01:00
Anton Khirnov
e02de9df4b lavc: export Dirac parsing API used by the ogg demuxer as public
Also, stop using AVCodecContext for storing the stream parameters.
2015-12-06 10:28:04 +01:00
Anton Khirnov
8bcadaacc2 mpegenc: use the CPB props side data
Do not access the encoder options, since it makes no sense when the
AVStream codec context is not the encoding context.
2015-12-06 10:26:13 +01:00
Anton Khirnov
5845a8273e movenc: use the CPB props side data
Do not access the encoder options, since it makes no sense when the
AVStream codec context is not the encoding context.
2015-12-06 10:26:01 +01:00
Luca Barbato
5f3a081b42 avi: Spin out the logic to position to the next non-interleaved stream
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-02 23:49:10 +01:00
Michael Niedermayer
0fc61c6ab6 avi: Validate the stream-id for DV as well
Avoid false positives while syncing.

Bug-Id: ffmpeg/4086
Bug-Id: 879

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-02 23:49:10 +01:00
Luca Barbato
d017ed878a avi: Use the correct data type
avio_tell returns an int64_t.
2015-12-02 23:49:10 +01:00
Mohamed Naufal
ca5f386e75 lavf: G.723.1 muxer
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-30 10:58:46 -05:00
Luca Barbato
a0fa6d06b8 matroska: Warn when metadata references a non-existent element
Avoid some confusion when the information is not present.

Bug-Id: 902
2015-11-28 17:02:15 +01:00
Luca Barbato
f7986239f4 dvenc: Validate the frame size before copying it 2015-11-28 17:02:15 +01:00
Luca Barbato
0e2395293b nut: Mark non-fatal errors as warnings
And make one more informative.
2015-11-25 09:01:25 +01:00
Luca Barbato
62f72b40c0 nut: Provide more information on failure 2015-11-25 09:01:25 +01:00
Luca Barbato
2c17fb61ce rtsp: Log getaddrinfo failures
And forward the logging contexts when needed.
2015-11-25 09:01:25 +01:00
Luca Barbato
12b1438286 udp: Provide additional information on getaddrinfo failure 2015-11-25 09:01:25 +01:00
Luca Barbato
34af7813f7 udp: Use the logging context 2015-11-25 09:01:25 +01:00
Luca Barbato
98063bcf15 rtsp: Do not assume getnameinfo cannot fail
And properly report the error when it happens.
2015-11-25 09:01:25 +01:00
Michael Niedermayer
5b70fb8fee movenc-test: Fix integer overflows
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-24 20:57:11 +02:00
Alexandra Hájková
8375dc1dd1 asfdec: handle the case when the stream index has an invalid value better
The demuxer returned INVALIDDATA and failed to demux the remaining data
when an invalid stream index was read, now it just skips the asf packet
for the stream with an invalid stream index and continues demuxing.

Reported-By: Hendrik Leppkes

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-23 11:42:55 +01:00
Derek Buitenhuis
c8fa647811 oggparsespeex: Fix unchecked malloc
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-23 10:44:07 +01:00
John Stebbins
ca489564ae movenc: add fallback audio track tref support
This feature allows making associations between audio tracks
that apple players recognize.  E.g. when an ac3 track has a
tref that points to an aac track, devices that don't support
ac3 will automatically fall back to the aac track.

Apple used to *guess* these associations, but new products
(AppleTV 4) no longer guess and this association can only
be made explicitly now using the "fall" tref.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-18 11:38:03 +01:00
John Stebbins
7f4ec4364b avformat: expose av_stream_new_side_data helper
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-18 11:36:27 +01:00
Anton Khirnov
21ab6fd01b lavf: document that passing valid timestamps to muxers is now mandatory
Also, extend the documentation about setting timestamps.
2015-11-18 11:31:40 +01:00
Michael Niedermayer
2fb6e1e754 segafilm: Fix current_sample after seeking and avio_seek return type
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-14 03:39:44 +01:00
Martin Storsjö
62b4a6f1b9 rtmpcrypt: Provide the xtea keys in little endian format for consistency
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-13 21:54:04 +02:00
Martin Storsjö
588b6215b4 rtmpcrypt: Do the xtea decryption in little endian mode
The XTEA algorithm operates on 32 bit numbers, not on byte sequences.
The XTEA implementation in libavutil is written assuming big endian
numbers, while the rtmpe signature encryption assumes little endian.

This fixes rtmpe communication with rtmpe servers that use signature
type 8 (XTEA), e.g. crunchyroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-13 21:53:57 +02:00
Vittorio Giovara
b5f963bfec mov: Drop dref when unable to parse
Some entries might be either empty or contain types we do not parse
(eg. 'url '). In both cases, if an 'alis' is not the first entry,
external references are not loaded, so make sure that the array starts
with an 'alis' dref.
2015-11-12 04:39:14 +01:00
Vittorio Giovara
303f931938 mov: Correctly store dref paths
Rather than reading the alternate absolute path version from dref
type 18, make sure that 0s are considered as '/'. These values are
sometimes present in the full path, and are mistakenly interpreted as
line terminators othewise.

With the correct handling of this dref type, parsing type 18 is not
needed any more.
2015-11-12 04:39:14 +01:00
Carl Eugen Hoyos
73b0324913 aiff: Support demuxing G.722 streams 2015-11-12 04:39:14 +01:00
Paul B Mahol
5f2c8315b3 thp: set duration for audio stream too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-12 04:39:14 +01:00
Martin Storsjö
1d62ee3889 movenc: Add a unit test for signaling of the track start times
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:53:42 +02:00
Martin Storsjö
bef3b1f59f movenc: Allow setting start_dts/start_cts before writing actual packets
By writing a zero-sized packet, the caller can communicate the
start_dts/start_cts for the stream without actually writing
the first packet.

This allows doing random-access writing of fragments when the
start dts of the stream isn't zero, so that the edit list in the moov
is written based on timestamps from the nominal start time signaled
via the zero-sized packet, while the first proper packet written
corresponds to a later fragment.

To avoid potential unexpected behaviour, empty packets only set
start_dts if the frag_discont flag is set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:53:31 +02:00
Martin Storsjö
3eeb7edfc2 movenc: Add a unit test for frag_discont with edit lists
This tests the case where the muxer correctly guesses that a stream
starts at pts=0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:52:53 +02:00
Martin Storsjö
09e431b9e3 movenc: Assume streams starting at pts=0 for discontinuous fragments with editlists
This allows producing fragments discontinously where the video
stream has b-frames (but starts at pts=0), but doesn't work for the
cases with audio with preroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:52:36 +02:00
Martin Storsjö
59e8ec0aa8 movenc: Add an API unit test for fragmenting options/calls
Contrary to the normal fate tests that run via avconv, this tests
nontrivial call sequences that are only doable via the API
(mainly for different corner cases when using the muxer for
segmenting).

The test muxes fake packet data (with extradata that looks
enough like proper data to make the file be viewable with e.g.
boxdumper) and checks the hash of the produced files. The test also
verifies that fragments produced via different call sequences remain
identical (to avoid e.g. updating the output hashes and suddenly
having fragments that used to be identical suddenly diverging), for
fragments written with frag_discont and/or delay_moov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-10 21:50:25 +02:00
Martin Storsjö
8ad5124b7e movenc: Automatically flush after writing the initial moov
In most other cases when writing fragmented mp4 files, the output
IO context is flushed after each fragment. Also flush it after
writing the initial moov, to have it behave in the same way.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-10 21:46:03 +02:00
Anton Khirnov
8de1ee9f72 lavf: deprecate compute_pkt_fields2
All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.

The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.
2015-11-09 07:50:55 +01:00
Anton Khirnov
aeda1121c9 lavf: factor out freeing an AVStream
It will be needed in other functions.
2015-11-08 11:49:23 +01:00
Anton Khirnov
a0c71a5751 lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
The reasoning for setting it to zero only applies to demuxing.
2015-11-08 11:48:47 +01:00
Michael Niedermayer
563e6d8603 segafilm: drop the "song and dance" for cinepak
This seems not to do anything any more since a long time, and removing
it avoids using uninitialized memory. Also change the error value
forwarding as done everywhere else.

Partly fixes: msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Paul B Mahol
1e791ee3aa segafilm: set video and audio stream duration
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Paul B Mahol
c012c6f1a8 segafilm: implement seeking
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
wm4
f128b8e19a mov: detect cover art pictures by content
I've got some m4a samples that had jpeg cover art marked as png. Since
these files were supposedly written by iTunes, and other software can
read it (e.g. clementine does), this should be worked around.

Since png has a very simple to detect header, while it's apparently a
real pain to detect jpeg in the general case, try to detect png and
assume jpeg otherwise. Not bothering with bmp, as I have no test case.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-03 15:03:12 +01:00
Luca Barbato
452d659aa4 msnwc_tcp: Use the correct return values
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 16:27:42 +01:00
Luca Barbato
f8d10511fe cosmetics: msnwc_tcp: Reformat
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 16:27:31 +01:00
Luca Barbato
4dfbc7a755 msnwc_tcp: Correctly report failure
And prevent a memory leak

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 16:26:37 +01:00
Luca Barbato
1e7ff5ac69 nut: Use the correct codec_tag when multiple are available
Some codecs use the codec_tag to signal specific information and
picking the first one would lead to a broken file.

Bug-Id: 883
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-11-02 12:10:38 +01:00
Vittorio Giovara
f53583ea6e omadec: Fix position of opening parenthesis 2015-10-30 12:46:56 +01:00
Martin Storsjö
00b62968d0 os_support: Don't try to return the service name as a string in getnameinfo
Some systems may be lacking getservbyport; the previous ifdef wasn't
quite enough since it still assumed that struct servent was defined,
as pointed out by Clément Gregoire.

Simply remove the possibility to return non-numeric services in
getnameinfo; no caller of getnameinfo within libavformat
currently try to use getnameinfo for retrieving the port number without
NI_NUMERICSERV, and falling back on getservbyport may be non-threadsafe.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-30 10:03:58 +02:00
Luca Barbato
9b56d5c114 avpacket: Deprecate av_dup_packet
As documented, `av_dup_packet` is broken by design, `av_packet_ref`
matches the AVFrame ref-counted API and can be safely used instead.
2015-10-26 18:00:55 +01:00
Luca Barbato
d584533cf3 avformat: Rework add_to_pktbuf
Make it return an error and check its return value when it is used.
Simplify the usage by calling `av_packet_ref` internally when needed.
2015-10-26 18:00:55 +01:00
Luca Barbato
ce70f28a17 avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Luca Barbato
a5d4204309 avformat: Always return ref-counted AVPacket
And drop the av_dup_packet from the input_thread.
2015-10-26 18:00:55 +01:00
Vittorio Giovara
533a619850 innoHeim/Rsupport Screen Capture Codec decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-23 14:56:43 +02:00
Luca Barbato
18f9308e6a mpjpeg: Cope with multipart lacking the initial CRLF
Some server in the wild do not put the boundary at a newline
as rfc1347 7.2.1 states.
Cope with that by reading a line and if it is not empty reading
a second one.

Reported-By: bitingsock
2015-10-23 11:56:38 +02:00
Luca Barbato
22f4d9c303 img2enc: Make sure the images are atomically written
Users that want to generate a live-preview and serve it
would otherwise get partial images.
2015-10-23 11:55:14 +02:00
Martin Storsjö
5ea5a24eb7 movenc: Honor flush requests with delay_moov, when some tracks lack samples
This also makes sure that a fragmented file without the empty_moov
flag (i.e. with a non-empty initial moov fragment) actually gets
written, if some of the tracks turn out to not have any samples.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-23 10:37:49 +03:00
Martin Storsjö
e02dcdf6bb rtsp: Allow $ as interleaved packet indicator before a complete response header
Some RTSP servers ("HiIpcam/V100R003 VodServer/1.0.0") respond to
our keepalive GET_PARAMETER request by a truncated RTSP header
(lacking the final empty line to indicate a complete response
header). Prior to 764ec70149, this worked just fine since we
reacted to the $ as interleaved packet indicator anywhere.

Since $ is a valid character within the response header lines,
764ec70149 changed it to be ignored there. But to keep
compatibility with such broken servers, we need to at least
allow reacting to it at the start of lines.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-23 10:31:55 +03:00
Vittorio Giovara
f890677d05 Replace any remaining avpicture function with imgutils
avpicture_get_size() -> av_image_get_buffer_size()

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-21 11:59:59 +02:00
Andrey Utkin
c134850669 httpauth: Add space after commas in HTTP/RTSP auth header
This fixes access to Grandstream cameras, which return 401 otherwise.
VLC sends Authorization: header with spaces between parameters, and it
is known to work with Grandstream devices and broad range of other HTTP
and RTSP servers, so author considers switching to such behaviour safe.

See RFC 2617 (HTTP Auth).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-14 14:35:34 +02:00
Michael Niedermayer
e55376a1fd rtmpproto: Write correct flv packet sizes at the end of packets
In one case it was written as zero, one case left it uninitialized,
missed the 11 bytes for the flv header.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-14 14:35:33 +02:00
Luca Barbato
34ed5c2e4d avformat: Do not use AVFMT_RAWPICTURE
There are no formats supporting it anymore and it is deprecated.
Update the documentation accordingly.
2015-10-13 13:43:29 +02:00
Luca Barbato
b9ece15a01 nullenc: Use the wrapped avframe pseudo-encoder 2015-10-10 14:50:42 +02:00
Luca Barbato
d00a8fd417 yuv4mpeg: Use the wrapped avframe pseudo-encoder 2015-10-10 14:50:42 +02:00
Alexandra Hájková
00cc10aee3 asfdec: do not skip padding if offset is above packet size - padding
Sample-Id: https://samples.libav.org/asf-wmv/demux-asf-assert-failed.wmv

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-08 21:55:31 +02:00
John Stebbins
f56a085593 matroskaenc: Don't write a track language tag
"language" is not an offical matroska tag.
Track languages are specified with the MATROSKA_ID_TRACKLANGUAGE ebml.
Writing the tag overrides the ebml specified language during playback with
libav and some other players.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-10-03 13:44:35 +02:00
Luca Barbato
74942685cb hls: Check av_opt_set_dict return value as well
Bug-Id: CID 1320426
2015-10-01 13:51:13 +02:00
Vittorio Giovara
9a3202a98b Screenpresso SPV1 decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-30 16:45:11 +02:00
Thierry Foucu
c5e5e63062 riff: Add support for RV40 codec in AVI
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-29 14:33:01 +02:00
wm4
948f3c19a8 lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:00 +02:00
wm4
cc8db76061 mpegts: use avcodec_get_type() to set codec_type
Note that this slightly changes behavior: it sets AVMEDIA_TYPE_UNKNOWN
if the codec type is unknown. This should be ok.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 10:50:50 +02:00
Luca Barbato
22cc57da64 rtpdec: Forward the memory failure
And avoid a memory leak.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-16 20:20:16 +02:00
Eloi BAIL
1ec611a102 rtsp: warning when max_delay reached
packets are queued due to packet reordering until the queue reach its
maximal size or max delay is reached.
This commit adds a warning trace when max delay is reached.

Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-16 09:58:12 +03:00
Eloi BAIL
d555bd69e7 rtpdec: inform jitter buffer size
This commit print as AV_LOG_VERBOSE the jitter buffer
size. It might be the default value or the value set by application.

Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-16 09:55:51 +03:00
Eloi BAIL
ff7f6ea9db rtpdec: add a trace when jitter buffer is full
This commit adds a warning trace when jitter buffer
is full. It helps to understand leading decoding issues.

Signed-off-by: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-16 09:54:14 +03:00
Martin Storsjö
3c525b8b47 rtpdec: Increase the max size of the jitter buffer to 500 packets
Since the actual max length of the jitter buffer is restricted by
max_delay, this shouldn't harm the overall latency (assuming that
max_delay is set properly), while allowing packet reordering with
a larger number of packets (which may be required with high bitrate
video).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-15 09:35:44 +03:00
Vittorio Giovara
10de408738 lavf: Update to the new crypto API 2015-09-13 17:34:45 +02:00
Alexandra Hájková
c0a49077ea asfdec: add more checks for size left in asf packet buffer
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 14:23:32 +02:00
Luca Barbato
41ed749fe9 ogg: Do not try to use the parser if it is not present
Bug-Id: 886
CC: libav-stable@libav.org
2015-09-10 14:47:33 +02:00
Alexandra Hájková
77cf236689 asfdec: alloc enough space for storing name in asf_read_metadata_obj
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-06 20:48:36 +02:00
Martin Storsjö
7cad1bf075 mov: Allow more than one keyframe per trun
The previous restriction was partially designed to fix certain
(broken) samples from bug 215. There should be no restriction on the
number of keyframes per fragment or trun.

The spec suggests that all frames lacking MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
are key frames, but we require the flag MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
to be unset as well. This works for (possibly broken) media that never
sets the NON_SYNC flag and should also be correct for any spec-compliant
file.

For files that never set either of the flags, all samples are marked
as keyframes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-06 21:24:37 +03:00
Vittorio Giovara
599fe93a84 riff: Add AVj2 fourcc for Avid jpeg2000 2015-09-04 17:51:29 +02:00
Sean McGovern
9ad1e0c12c mux: Make sure that the data is actually written
And forward the error if it is not.

Bug-Id: 881

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-03 13:39:34 +02:00
Sean McGovern
e05f7ed543 file: properly forward errors from file_read() and file_write()
Bug-Id: 881

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-03 13:39:34 +02:00
Vittorio Giovara
c45fcf30cf DXV decoder
Support all DXDI and DXD3 normal quality videos.
2015-09-02 22:22:02 +02:00
Vittorio Giovara
e88103a7f9 Bump major versions of all libraries
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-08-28 16:04:28 +02:00
Vittorio Giovara
4e649debcf Postpone API-incompatible changes until the next bump 2015-08-28 16:04:28 +02:00
Vittorio Giovara
01bcc2d5c2 lavc: Drop deprecated destruct_packet related functions
Deprecated in 10/2012.
2015-08-28 16:01:16 +02:00
Luca Barbato
e176639bcb webm: Explicitly select libvpx, libopus and libvorbis encoders
And update the preference for the newer codecs now that the libraries
seem stable and widespread enough.

Bug-Id: 695
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-25 19:47:43 +02:00
Luca Barbato
2157df425b hlsenc: Support outputting specific versions
Right now only version 2 and version 3 are supported.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-25 19:43:58 +02:00
Alexandra Hájková
317cfaa5e0 asfdec: prevent the memory leak in the asf_read_metada_obj
also do not return the error code but just break reading
metadata object in the case of the aspect ratio reading failure

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-16 20:00:37 +02:00
Luca Barbato
72839fce64 hlsenc: Use AV_TIME_BASE units for all the computations
Do not risk mixing different timebases.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-16 19:02:16 +02:00
Martin Storsjö
26ac22e5e7 movenc: Add a new flag for writing global sidx indexes for dash
The double meaning of the faststart flag (moving a moov atom
to the start of files, making them streamable, for non-fragmented
files, vs inserting a global sidx index at the start of files
for fragmented files) is confusing - see 40ed1cbf1 for
explanation of its origins.

Since the second meaning of the flag hasn't been part of any
libav release yet, just rename it to get rid of the confusion
without any extra deprecation (which wouldn't get rid of the
potential confusion, of users adding -movflags faststart
even for fragmented files, where it isn't needed for making
them "streamable").

This gets back the old behaviour, where -movflags faststart
doesn't have any effect for fragmented files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-12 13:41:46 +03:00
Martin Storsjö
5f200bbf98 movenc: Place the sidx index after the initial moov/mdat pair
For fragmented files with non-empty moov, with a fragment index
(sidx), place the index after the initial moov/mdat pair.

Previously, for this pathological case, the index was written
at the start of the file.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-10 09:46:14 +03:00
Martin Storsjö
83f254e65f movenc: Rename reserved_moov_pos to reserved_header_pos
The same field is also used for writing the sidx index header,
for fragmented files, when the faststart flag is used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-10 09:46:07 +03:00
Martin Storsjö
8e34089e26 movenc: Check that frag_info entries exist in mov_write_sidx_tag
This fixes crashes with pathological cases when trying to write
a sidx index (via the -movflags faststart option, in combination
with fragmenting options), when no fragments actually have been
written. (This is possible if the empty_moov flag isn't used,
so that all actual packet data is written in the moov/mdat pair,
and no moof/mdat pairs have been written.)

In these pathological cases, no sidx should be written at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-08-10 09:46:03 +03:00
Luca Barbato
e5997152f5 asf: Use time_t where needed
gmtime takes a time_t not an uint64_t.
2015-08-04 21:40:04 +02:00
Alexandra Hájková
944f60866f asfdec: read values properly
The length of BOOL values is 16 bits in the Metadata Object but
32 bits in the Extended Content Description Object.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-08-04 21:33:55 +02:00
Alexandra Hájková
fdbc544d29 asfdec: prevent the memory leak while reading metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-08-02 08:43:51 +02:00
Alexandra Hájková
33dc1913ab asfdec: remove improper assignement that caused wrong timestamps
and remove unneeded variable

Sample-Id: https://samples.libav.org/asf-wmv/asf-code-53/movn018.asf

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-31 09:10:05 +02:00
Alexandra Hájková
78491fe8cf asfdec: do not export empty metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-31 09:09:27 +02:00
Alexandra Hájková
cd4d9df227 asfdec: free AVDictionaries properly when closing the demuxer
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-31 07:23:20 +02:00
Martin Storsjö
764ec70149 rtsp: Only interpret $ as interleaved packet indicator at the start of replies
Allow $ as character anywhere within normal RTSP replies - both
within the lines, and as the first character of RTSP header lines.
(The existing old comment indicated that an inline packet could
start at any line within a RTSP reply header, but that doesn't
sound valid to me, and I'm not sure if the existing code
handled that correctly either.)

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-30 16:59:36 +03:00
Luca Barbato
0c73a5a53c hls: Save and forward avio options
Make possible to send the custom headers and override the user agent.

Reported-by: BenWonder
2015-07-30 11:21:26 +02:00
Luca Barbato
5ae178539b http: Add the trailing endlines if they are missing
Makes slightly easier the life of those want to use the option
from the command line
2015-07-30 11:21:26 +02:00
James Almer
9487ffd4c0 rtmpproto: free hmac context properly
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-30 09:26:49 +03:00
James Almer
65dd6a1f84 rtmpproto: use AVHMAC instead of a custom implementation
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-07-29 22:09:16 +03:00
Alexandra Hájková
b5c1c16247 asfdec: do not align Data Object when Broadcast Flag is set
its size is invalid in this case

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-27 18:09:30 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara
7c6eb0a1b7 lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Alexandra Hájková
9e8627a1ff asfdec: interpret the first flag in an asf packet as length flag
if the error correction flag is not set, a packet starts with payload

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-27 07:50:32 +02:00
Alexandra Hájková
7f388c0fab asfdec: remove the wrong condition
this condition breaks reading from the pipe as data_reached variable
have to be set to break while in the asf_read_header just after the Data
Object is found

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-23 10:50:27 +02:00
Alexandra Hájková
aed7715b8f asfdec: increment nb_streams right after the stream allocation
to prevent possible memory leaks

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-23 09:48:26 +02:00
Alexandra Hájková
ee80f834cb asfdec: set nb_streams to 0 in the asf_read_close
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-23 09:47:59 +02:00
Alexandra Hájková
2a187a074a asfdec: avoid crash in the case when chunk_len is 0 or pkt_len is 0
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-22 12:11:46 +02:00
Alexandra Hájková
93f16f338f asfdec: close the demuxer properly when read_header is failing
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-22 12:11:46 +02:00
Alexandra Hájková
5655236a67 asfdec: factor out seeking to the Data Object outside while
return INVALIDDARA if Data Object was not found

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-22 12:11:46 +02:00
Vittorio Giovara
5d3addb937 Add a quality factor packet side data
This is necessary to preserve the quality information currently exported
with coded_frame. Add the new side data to every encoder that needs it,
and use it in avconv.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:47 +01:00
Alexandra Hájková
e61f39849c asfdec: make nb_sub to be unsigned int
number of subpayloads should be always positive

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-19 09:20:01 +02:00
Alexandra Hájková
2883ef34b5 asfdec: read the replicated data in a separate function
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-19 09:18:27 +02:00
Alexandra Hájková
0989d3ad1f asfdec: convert condition for the replicated data reading to be safer
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-19 09:16:28 +02:00
Alexandra Hájková
406627287e asfdec: do not read replicated data when their length is 0
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-19 08:59:48 +02:00
Vittorio Giovara
f1840b070d Revert "mov: Double-check that alias path is not an absolute path"
This reverts commit 9286de0459.
The change broke support for legit absolute file paths.

Reported-by: Maksym Veremeyenko <verem@m1stereo.tv>.
2015-07-17 01:44:22 +01:00
Luca Barbato
4512ee78e1 mpegts: Mark the muxer as supporting variable fps
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-15 19:43:48 +02:00
Luca Barbato
a5a6a786bf mp3: Forward seeking errors
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-13 21:59:53 +02:00
Alexandra Hájková
c571424c7f asfdec: prevent memory leaks found with Coverity Scan
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-13 20:27:34 +02:00
Hendrik Leppkes
796268654c asfdec: always reset packet state after seeking
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-12 13:24:23 +02:00
Andreas Cadhalpun
f1bdc23437 riff: Validate bitrate 2015-07-11 18:45:45 +02:00
Luca Barbato
c1d647b15a mp3: Make the seek more robust
Try to parse up to 4 packets to find the closest packet.

Reported-By: jan.schlueter@ofai.at
2015-07-11 18:45:45 +02:00
Luca Barbato
d80811c94e riff: Use the correct logging context 2015-07-11 18:45:44 +02:00
Alexandra Hájková
872fab4a3d asfdec: Fix reading from the pipe
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-10 13:25:02 +02:00
Anton Khirnov
0e7c0ec344 lavf/hevc: pad the RBSP buffer as required by the bistream reader 2015-07-08 23:36:10 +02:00
Frank Heckenbach
161a301d44 mpjpeg: Write the Content-length 2015-07-04 00:51:03 +02:00
Luca Barbato
d09b4cce21 mpjpeg: Simplify using avio_printf 2015-07-04 00:46:44 +02:00
Vittorio Giovara
f046c3b5ac lavc: Move deprecation warning disabling to files including the table
Unbreak build from 7a5902c556.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-03 21:02:50 +02:00
Alexandra Hájková
016cac75c6 asfdec: prevent the infinite loop in detect unknown_subobject
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-03 01:50:09 +02:00