Commit Graph

18498 Commits

Author SHA1 Message Date
Mats Peterson
7973603843 avformat/matroskadec: palettized QuickTime video in Matroska
Palettized QuickTime video in Matroska has hitherto not been recognized
whatsoever, and the "palette" used has been completely random.

The patch for matroskadec.c fixes this issue by adding a palette side
data packet in matroska_deliver_packet(), much in the same way as it's
done in mov.c.

Video samples for testing are available at
https://drive.google.com/open?id=0B3_pEBoLs0faWElmM2FnLTZYNlk.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-28 02:47:58 +01:00
Mats Peterson
57631f1851 avformat: factor ff_get_qtpalette() out of mov.c
This consists mainly of moving the palette handling from
the mov_parse_stsd_video() function to a new ff_get_qtpalette() function
in the new file qtpalette.c, which will be shared by both matroskadec.c and
mov.c.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-28 02:47:26 +01:00
Joel Holdsworth
c48122d731 avformat/hls: Added http_proxy support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-27 21:44:15 +01:00
Joel Holdsworth
9cdccd404b avformat/hls: Remember to free HLSContext::headers
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-27 21:44:15 +01:00
Joel Holdsworth
b4eb1f29eb avformat/http: Added http_proxy option
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-27 21:44:14 +01:00
Reynaldo H. Verdejo Pinochet
baf4c489e5 avio: add detail to avio_printf() size warning
Previous "currently size is limited" didn't give away
much in terms of useful info.

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
2015-12-27 00:09:16 -08:00
Michael Niedermayer
e70d56b8ad avformat/img2dec: Reuse main IO context instead of reopening a single file
Fixes part of Ticket4849

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-26 20:21:52 +01:00
Michael Niedermayer
e9e8782202 avformat/img2dec: Skip checking the input files existence if it has already been opened
Avoids a unneeded open
Fixes part of Ticket4849

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-26 20:21:52 +01:00
Michael Niedermayer
4bec36f98c avformat/mpegts: consider stream_type 4 just a hint toward mp3 and not definite
Fixes Ticket 4864

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-24 20:47:25 +01:00
Stefan Pöschel
470749703e avformat/mpegtsenc: add flag to embed an AC-3/E-AC-3 ES the DVB way
So far an AC-3 elementary stream is refered to in the PMT according to
System A (ATSC). An E-AC-3 ES in contrast is embedded the System B (DVB) way.
To fix this inconsistency, this commit changes the default E-AC-3 behaviour to
use the ATSC way, too. Furthermore a new flag is added to optionally select the
DVB way (regarding both codecs and possible further differences in the future).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-24 02:30:33 +01:00
wm4
a0ec4aebab avformat/subtitles: treat negative duration like unknown duration
Fixes a specific srt sample, which has an event with negative duration.
libavcodec will convert an event with negative duration to an ASS event
which will be displayed forever, which is not wanted here.

Treat negative duration always as unknown duration instead, and show it
until the next subtitle event.
2015-12-23 15:08:58 +01:00
Andreas Cadhalpun
7172175da6 mlvdec: validate bits_per_coded_sample
A negative bits_per_coded_sample doesn't make sense.
If it is too large, the size calculation for av_get_packet overflows,
resulting in allocation of a too small buffer.

Also make sure width and height are sane.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-22 19:39:43 +01:00
Michael Niedermayer
5dbd114b83 avformat/movenc-test: Make format static
Makes greping for non static consts easier

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-22 17:17:56 +01:00
Michael Niedermayer
d3b6a9abac avformat/mov: Update handbrake_version threshold for full mp3 parsing
Fixes: Endangered\ Species\ 1x01\ Collecting\ Merl.mp4

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-22 16:21:47 +01:00
Carl Eugen Hoyos
b18230ee8c lavf/rmdec: Use correct format specifier for int64_t.
Fixes ticket #5100.
2015-12-22 09:29:08 +01:00
Ganesh Ajjanagadde
fc5e39544b lavf/avformat: add av_warn_unused_result to avformat_write_header
May be useful as a defense, see e.g c62d1780ff.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-21 08:39:57 -08:00
Clément Bœsch
b4431c80ef lavf/img2enc: add atomic_writing option
This behaviour change caused a regression on our side recently, we might
want to disable the option by default.
2015-12-21 11:19:51 +01:00
Andreas Cadhalpun
f6830cf5ba nuv: sanitize negative fps rate
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-20 12:22:45 +01:00
Andreas Cadhalpun
9fcfe4a3cd mlvdec: check that index_entries exist
This fixes NULL pointer dereferencing.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-20 11:57:54 +01:00
Ganesh Ajjanagadde
18bc3dc768 lavf/hlsenc: replace round by lrint
Mainly cosmetic here.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-12-19 09:33:49 -08:00
Andreas Cadhalpun
ce10f572c1 nutdec: reject negative value_len in read_sm_data
If it is negative, it can cause the byte position to move backwards in
avio_skip, which in turn makes sm_size negative and thus size larger
than the size of the packet buffer, causing invalid writes in avio_read.

Also fix potential overflow of avio_tell(bc) + value_len.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-19 17:57:56 +01:00
Andreas Cadhalpun
9f82506c79 nutdec: only copy the header if it exists
Fixes ubsan runtime error: null pointer passed as argument 2, which is
declared to never be null

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-19 12:30:59 +01:00
Rostislav Pehlivanov
591b240ed4 oggparsedaala: sync with current bitstream syntax
Since the parser was merged back almost 2 months ago this is the first
time the bitstream of the container has been updated.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-12-18 22:54:38 +00:00
Hendrik Leppkes
5242cc878a Merge commit 'febfb49a70e82f5ac46dc7ea34dabd4d56b19b31'
* commit 'febfb49a70e82f5ac46dc7ea34dabd4d56b19b31':
  matroskadec: Fix sample_aspect_ratio for stereo matroska content

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-18 14:49:56 +01:00
Michael Niedermayer
e839db2288 avformat/oggparsedirac: Export sample aspect ratio
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-17 19:00:26 +01:00
rsn8887
02e9ba42eb avformat/xmv: Add *.xmv to the recognized extensions for the XMV format. 2015-12-17 17:50:42 +01:00
Hendrik Leppkes
bd88914b15 Merge commit 'b8b21dee0f0b4bcc1888067c497d6e838859d2cd'
* commit 'b8b21dee0f0b4bcc1888067c497d6e838859d2cd':
  mxfenc: always assume long gop

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 14:49:24 +01:00
Hendrik Leppkes
efcc8fddd6 Merge commit 'e02de9df4b218bd6e1e927b67fd4075741545688'
* commit 'e02de9df4b218bd6e1e927b67fd4075741545688':
  lavc: export Dirac parsing API used by the ogg demuxer as public

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 14:48:46 +01:00
Hendrik Leppkes
079b5d4ef8 Merge commit '8bcadaacc2b8dc3c5d6569835a5ca20e62d3efca'
* commit '8bcadaacc2b8dc3c5d6569835a5ca20e62d3efca':
  mpegenc: use the CPB props side data

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 13:55:39 +01:00
Hendrik Leppkes
f95385dd58 Merge commit '5845a8273e4694e0254ad728970b82bb64fd8bc0'
* commit '5845a8273e4694e0254ad728970b82bb64fd8bc0':
  movenc: use the CPB props side data

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 13:50:36 +01:00
Michael Niedermayer
6ea7dd25c7 avformat/swfenc: Check frama rate before writing it
Fixes assertion failure with ffserver

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-17 02:07:41 +01:00
Andreas Cadhalpun
ecf63b7cc2 ffm: reject invalid codec_id and codec_type
A negative codec_id cannot be handled by the found_decoder API of
AVStream->info: if the codec_id is not recognized, found_decoder is set
to -codec_id, which has to be '<0' according to the API documentation.

This can cause NULL pointer dereferencing in try_decode_frame.

Also make sure the codec_type matches the expected one for codec_id.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-15 22:43:25 +01:00
erankor
4469e8ebb2 movenc: support cenc (common encryption)
support writing encrypted mp4 using aes-ctr, conforming to ISO/IEC
23001-7.

3 new parameters were added:
- encryption_scheme - allowed values are none (default) and cenc-aes-ctr
- encryption_key - 128 bit encryption key (hex)
- encryption_kid - 128 bit encryption key identifier (hex)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-15 14:16:28 +01:00
Michael Niedermayer
b51e7554e7 avformat/mxfenc: Do not crash if there is no packet in the first stream
Fixes: Ticket4914

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-13 16:42:48 +01:00
Nicolas George
1acc90eaa5 lavf/tee: fix side data double free.
Similar to 33fefdb44.
Fix trac ticket #4921.

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-13 09:41:41 +01:00
Michael Niedermayer
c62d1780ff avformat/hlsenc: Check the return code of avformat_write_header()
Fixes: segfault
Fixes: Ticket5067

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-13 02:28:13 +01:00
Michael Niedermayer
861f47ddf4 avformat/mov: Enable parser for mp3s by old HandBrake
Fixes Ticket5047

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-13 02:11:56 +01:00
Michael Niedermayer
537e901fe6 avformat/mxfenc: Fix integer overflow in length computation
Fixes: CID1341577

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-13 02:11:56 +01:00
Lvqier
93d336fb07 avformat/segment: Fix memory leak of cur_entry.filename
Solution suggested-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-12 23:19:22 +01:00
Carl Eugen Hoyos
7c1c453ce9 lavf/matroskadec: Set codec_tag also for audio codecs.
This was already done for "A_MS/ACM" mkv files and it is done
for mov files but was not done for A_QUICKTIME" mkv files.
2015-12-12 18:21:45 +01:00
Michael Niedermayer
edfc835a56 avformat/mpegtsenc: Add basic multi program support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-11 22:27:25 +01:00
Michael Niedermayer
676a93f2d8 avformat: Add av_program_add_stream_index()
This will be used by the subsequent commit(s)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-11 22:27:25 +01:00
Kieran Kunhya
8dcc99dc68 diracdec: Extract version parameters 2015-12-10 21:26:35 +00:00
Kieran Kunhya
9553689854 diracdec: Move strides to bytes, and pointer types to uint8_t.
Start templating functions for move to support 10-bit
Parts of this patch were written by Rostislav Pehlivanov
2015-12-10 16:52:48 +00:00
Alex Agranovsky
7fd1c85e51 lavf/mpjpegdec: Fixed dereference after null check
Fixes Coverity CID 1341576

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-09 19:55:25 +01:00
Michael Niedermayer
80ceb4696a avformat/rmdec: Fix use of uninitialized variable
Fixes: CID1341580

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-09 18:17:47 +01:00
Michael Niedermayer
8cfa912e25 avformat/flacdec: remove unused return code assignment
Fixes CID1271811

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-09 16:47:55 +01:00
Michael Niedermayer
e6971db12b avformat/matroskaenc: Check codecdelay before use
Fixes CID1238790

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-09 16:18:14 +01:00
Hendrik Leppkes
6a6cfeb2e7 Merge commit '5f3a081b42b84404a40a52c80ef7a354cf048c56'
* commit '5f3a081b42b84404a40a52c80ef7a354cf048c56':
  avi: Spin out the logic to position to the next non-interleaved stream

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-08 09:41:43 +01:00
Marton Balint
97795ba6c3 lavf/mxfdec: fix seeking before the first keyframe
Regression since 53f2ef2c4a.
Fixes ticket #5017.

Signed-off-by: Marton Balint <cus@passwd.hu>
2015-12-08 02:14:44 +01:00