Commit Graph

19782 Commits

Author SHA1 Message Date
Michael Niedermayer
8fa18e042a avformat/http: Check for truncated buffers in http_connect()
Reported-by: SleepProgger <security@gnutp.com>
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-14 04:02:51 +01:00
Bela Bodecs
2b9f92fcc5 avformat/hlsenc: fix stream level metadata handling
hls-encoder currenlty does not provide stream level metadata to mpegts
muxer. This patch fixes track #3848 bug.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-13 07:33:48 +08:00
Jan Ekström
763e823754 movenc: add support for track names in ISML manifests
This enables having multiple tracks of the same type which would
be treated as different things by the media server (as opposed to
different bit rate versions of the same track). According to the
smooth streaming specification, just setting the systemLanguage
tag is not enough to note that a track with the same attributes
differs from another one.

Reviewed-by: Martin
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-12 20:18:32 +01:00
Carl Eugen Hoyos
79d232fc9f lavf/mpegts: Make a pointer cast explicit.
Silences an "assignment discards ‘const’ qualifier" warning.

Reviewed-by: Marton Balint
2017-02-12 13:57:59 +01:00
Paul B Mahol
8259f8a720 avcodec: add FM Screen Capture Codec decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-12 10:43:45 +01:00
Paul B Mahol
25d9cb4621 avformat/flic: fix handling of EOF case
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-11 20:20:07 +01:00
Carl Eugen Hoyos
5b2c0eebee lavf/omadec: Fix packet duration for Atrac 3 lossless. 2017-02-11 19:01:14 +01:00
Carl Eugen Hoyos
ed491db3e5 lavf/rtpdec_mpeg4: Constify a function parameter.
Silences an "assignment discards ‘const’ qualifier" warning.
2017-02-11 16:19:37 +01:00
Carl Eugen Hoyos
7ff445874b lavf/omadec: Remove an unsed variable. 2017-02-11 15:55:11 +01:00
Paul B Mahol
280a40dd27 avcodec: add ATRAC Advanced Lossless decoders
Only lossy part is decoded for now.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-11 12:00:38 +01:00
Steven Liu
d96ebc5ef8 avformat/hlsenc: deprecate hls_wrap option
When user use the hls_wrap, there have many problem:
1. some platform refersh the old but usefull segment
2. CDN(Content Delivery Network) Deliver HLS not friendly

The hls_wrap is used to wrap segments for use little space,
now user can use hls_list_size and hls_flags delete_segments
instead it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-11 12:32:31 +08:00
James Almer
7b3f0b3de4 avformat/apetag: bump micro version
In case parsers care about the version that started writing
correct flags.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-10 21:03:24 -03:00
James Almer
33ab1d4c6f avformat/apetag: reorder some code to improve readability
This way it's clear the size field accounts for the footer length plus every
tag entry, but not the header.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-10 18:33:30 -03:00
James Almer
84d874a680 avformat/apetag: account for header size if present when returning the start position
The size field in the header/footer accounts for the entire APE tag
structure except the 32 bytes from header, for compatibility with
APEv1.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-10 18:33:29 -03:00
James Almer
e8d6fef316 avformat/apetag: fix flag value to signal footer presence
According to the spec[1], a value of 0 means the footer is present and a value
of 1 means it's absent, the exact opposite of header presence flag where 1
means present and 0 absent.
The reason for this is compatibility with APEv1 tags, where there's no header,
footer presence was mandatory for all files, and the flags field was a zeroed
reserved field.

[1] http://wiki.hydrogenaud.io/index.php?title=Ape_Tags_Flags

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-10 18:33:29 -03:00
Carl Eugen Hoyos
74c576957a lavf/movenc: Remove two unused variables. 2017-02-10 12:40:43 +01:00
Matt Wolenetz
36aba43bd5 lavf/mov.c: Avoid heap allocation wraps in mov_read_{senc,saiz}()
Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643952 (senc,saiz portions)

Signed-off-by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-10 12:04:41 +01:00
Matt Wolenetz
9bbdf5d921 lavf/mov.c: Avoid OOB in mov_read_udta_string()
Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643952 (udta_string portion)

Signed-off-by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-10 12:04:41 +01:00
Matt Wolenetz
2d453188c2 lavf/mov.c: Avoid heap allocation wrap in mov_read_uuid
Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643951

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Check value reduced as the code does not support values beyond INT_MAX
Also the check is moved to a more common place and before integer truncation
2017-02-08 03:57:10 +01:00
Matt Wolenetz
fd30e4d57f lavf/mov.c: Avoid heap allocation wrap in mov_read_hdlr
Core of patch is from paul@paulmehta.com
Reference https://crbug.com/643950

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Check value reduced as the code does not support larger lengths
2017-02-08 03:31:01 +01:00
Petri Hintukainen
dface53497 matroska: demux BluRay text subtitles
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-07 21:32:08 +01:00
Aman Gupta
606eac7b07 avformat/hlsenc: add hls_flag option to write segments to temporary file until complete
Adds a `-hls_flags +temp_file` which will write segment data to
filename.tmp, and then rename to filename when the segment is complete.

This patch is similar in spirit to one used in Plex's ffmpeg fork, and
allows a transcoding webserver to ensure incomplete segment files are
never served up accidentally.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Bodecs Bela <bodecsb@vivanet.hu>
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-07 11:58:43 +08:00
Chris Cunningham
ac25840ee3 lavf/matroskadec: fix is_keyframe for early Blocks
Blocks are marked as key frames whenever the "reference" field is
zero. This breaks for non-keyframe Blocks with a reference timestamp
of zero.

The likelihood of reference timestamp being zero is increased by a
longstanding bug in muxing that encodes reference timestamp as the
absolute time of the referenced frame (rather than relative to the
current Block timestamp, as described in MKV spec).

Now using INT64_MIN to denote "no reference".

Reported to chromium at http://crbug.com/497889 (contains sample)
2017-02-06 09:33:28 +01:00
Marton Balint
85169a75e1 avformat/segment: remove last_cut check when detecting a new segment
Not starting a new segment if the elapsed microsecs since the start of the day
equals the the elapsed microsecs since the start of the day at the time of the
last cut seems plain wrong to me, Deti do you remember the original reason
behind this check?

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-04 23:36:45 +01:00
Carl Eugen Hoyos
7d169ba1d8 lavf/isom: Support DTS Express in mov.
Fixes ticket #6124.
2017-02-03 19:01:59 +01:00
Clément Bœsch
f475405237 Merge commit '7f549b8338ed3775fec4bf10421ff5744e5866dd'
* commit '7f549b8338ed3775fec4bf10421ff5744e5866dd':
  riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data.

Only cosmetics, the change was already present.

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-02-02 11:36:34 +01:00
Paul B Mahol
c279c44a3a avformat/msf: support codec 1, which is 16 bit pcm le
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-02-01 19:21:01 +01:00
Clément Bœsch
e26e6240b6 Merge commit '90bc423212396e96a02edc1118982ab7f7766a63'
* commit '90bc423212396e96a02edc1118982ab7f7766a63':
  mov: Wrap stsc index and count compare in a separate function

The mov_stsc_index_valid() function is replaced with a macro to prevent
signdness issues (index is not always signed, and count is always
unsigned currently).

The comparison is also adjusted to reduce the risk of overflows.

Merged-by: Clément Bœsch <u@pkh.me>
2017-02-01 15:50:02 +01:00
erankor
0101d29095 mov: fix decryption with edit list
Retain the ranges of frame indexes when applying edit list in
mov_fix_index. The index ranges are then used to keep track of the frame
index of the current sample. In case of a discontinuity in frame indexes
due to edit, update the auxiliary info position accordingly.

Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 15:09:38 +01:00
Andreas Cadhalpun
4bd5d824e9 boadec: remove log messages
Requested-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-02-01 02:57:40 +01:00
Moritz Barsnick
0478728db0 lavf/xwma: fix incorrect format specifier
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2017-01-31 10:42:14 +01:00
Tobias Rapp
e65db4ce59 avformat/avienc: add reserve_index_space option
Allows the user to reserve space for the ODML master index. A sufficient
sized master index in the AVI header avoids storing follow-up master
indexes within the 'movi' data later. If the option is omitted or zero
the index size is estimated from output duration and bitrate.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-01-31 09:00:23 +01:00
Andreas Cadhalpun
3d673078a0 ircamdec: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-31 02:11:17 +01:00
Michael Niedermayer
06c143e505 avformat/mov: Fix integer truncation in mov_read_uuid()
Fixes Ticket6102

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-30 23:19:01 +01:00
bnnm
ebb83e2dc0 avformat/msf: fix codec 4 (joint stereo ATRAC3) and align
Codec 4 (frame size 98) uses joint stereo per spec and examples.
Also removed an incorrect "align" var which wasn't used anyway (it was overwrittern).

Probably all/only .AT3 of frame size 98 are JS, too.

Signed-off-by: bnnm <bananaman255@gmail.com>
2017-01-30 13:01:07 +01:00
Tobias Rapp
ec33ade7d3 avformat/Makefile: fix compilation of testprogs when networking is disabled
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-01-30 12:14:43 +01:00
Paul B Mahol
036e12b225 avformat: add SCC muxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-30 11:00:58 +01:00
Paul B Mahol
76331361a5 avformat/sccdec: simplify 2 sscanf calls
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-30 11:00:58 +01:00
Andreas Cadhalpun
cba4f0e97e xvag: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-30 01:40:48 +01:00
Andreas Cadhalpun
74bd17d316 epafdec: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-30 01:40:48 +01:00
Andreas Cadhalpun
5b0ae88ca6 genh: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-30 01:40:48 +01:00
Andreas Cadhalpun
9ec8790ac4 boadec: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-29 01:20:52 +01:00
Andreas Cadhalpun
169c1cfa92 pvfdec: prevent overflow during block alignment calculation
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-29 01:20:52 +01:00
Andreas Cadhalpun
8812d047bc electronicarts: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-29 01:20:52 +01:00
Andreas Cadhalpun
e3f13d3a87 4xm: prevent overflow during block alignment calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-29 01:20:48 +01:00
Marijn Meijles
227d602bb3 avformat/ac3dec: Fix to prevent runaway ac3 detection by looking at the actual frame rather than the first detected frame.
When detecting a swapped AC3 marker the data of the frame is swapped. However, in subsequent frames the data swapped is taken from the first frame rather than the current frame.

Signed-off-by: Marijn Meijles <marijn@bitpit.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-28 23:08:42 +01:00
Paul Arzelier
65862f57ad avformat: Ignore ID3v2 tags if other tags are present e.g. vorbis
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-28 23:08:42 +01:00
James Almer
dce863421b avformat/matroskaenc: don't reserve more bytes than needed for the Colour master size
Found-by: Aaron Colwell <acolwell@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-28 13:46:26 -03:00
Paul B Mahol
4cfa1f80a9 avformat/sccdec: attempt to fix valgrind issue
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-28 17:23:31 +01:00
Chris Moeller
ecd360041e avformat: fix ID3v2 parser for v2.2 comment frames
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-28 13:52:09 +01:00