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.
9 years ago
Michael Niedermayer
edfc835a56
avformat/mpegtsenc: Add basic multi program support
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
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>
9 years ago
Kieran Kunhya
8dcc99dc68
diracdec: Extract version parameters
9 years ago
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
9 years ago
Alex Agranovsky
7fd1c85e51
lavf/mpjpegdec: Fixed dereference after null check
...
Fixes Coverity CID 1341576
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
80ceb4696a
avformat/rmdec: Fix use of uninitialized variable
...
Fixes: CID1341580
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
8cfa912e25
avformat/flacdec: remove unused return code assignment
...
Fixes CID1271811
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
e6971db12b
avformat/matroskaenc: Check codecdelay before use
...
Fixes CID1238790
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
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>
9 years ago
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>
9 years ago
Ganesh Ajjanagadde
d5f5c90be9
rtsp: free opts dictionary on failure of getnameinfo
...
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years ago
Ganesh Ajjanagadde
8df8f0c70c
movenc-test: add a missing va_end call
...
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years ago
Anshul Maheshwari
162754c1e0
Remove Redundant Entry of MPEG2 Video Desc
...
Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
f1f323b6de
avformat/movenc-test: correct varargs usage
...
It is required to call va_end for each invocation of va_start within the
same function.
Fixes: CID 1341583.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Ganesh Ajjanagadde
90409b6da8
avformat/rtsp: free opts dictionary on failure of getnameinfo
...
Fixes: CID 1341579.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
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.
9 years ago
Anton Khirnov
e02de9df4b
lavc: export Dirac parsing API used by the ogg demuxer as public
...
Also, stop using AVCodecContext for storing the stream parameters.
9 years ago
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.
9 years ago
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.
9 years ago
Michael Niedermayer
7ed47e9729
avformat/smacker: fix integer overflow with pts_inc
...
Fixes: ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Neil Birkbeck
a16243a4aa
libavformat/mov.c: allow QuickTime metadata to come after traks
...
QuickTime metadata can come after trak data. Add indicator for which trak is being parsed (-1 if none) so that global metadata after the trak can be parsed.
Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
ab7ff38052
avformat/flvdec: Fix left shift of 137 by 24 places cannot be represented in type int
...
Fixes: 3c857d4d90365731524716e6d051e43a/signal_sigsegv_7f4f59bcc29e_1386_20abd2c8e655cb9c75b24368e65fe3b1.flv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
689a867413
avformat/msf: Check channels when reading the header
...
Fixes integer overflow
Fixes: 0c2625f236ced104d402b4a03c0d65c7/asan_generic_274e1ce_5990_9314e7a67c26aecf011b178ade9f217c.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
43ecec0f03
avformat: use AV_OPT_TYPE_BOOL in a bunch of places
9 years ago
Andreas Cadhalpun
a611375db5
ffmdec: reject zero-sized chunks
...
If size is zero, avio_get_str fails, leaving the buffer uninitialized.
This causes invalid reads in av_set_options_string.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
488e9a06f0
ffmdec: only seek back at EOF if a server is attached
...
Otherwise the ffm demuxer can return the same packets endlessly, if
there is no server attached.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Michael Niedermayer
0c1d62ab9d
avformat/oggparsetheora: Check duration to be not AV_NOPTS_VALUE (and positive) before use
...
Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_7322_4fad88a38dc8952dc20dcb60c1895758.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Yann Coupin
d89c4846e0
avformat/movenc: HE-AAC correct FourCC in ISML
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
9696a01f12
avformat/mpjpegdec: Fix "libavformat/mpjpegdec.c:269:9: warning: passing argument 3 of av_stristart from incompatible pointer type"
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Sebastian Dröge
eb3628d87f
mpegtsenc: Fix off-by-one in indexing into Opus channel mapping arrays
...
Fixes, CID1338323, CID1338324
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
cafb195604
avformat/utils: Fix "libavformat/utils.c:927:35: runtime error: signed integer overflow: -2450238577049583619 - 9223090561878065151 cannot be represented in type long long"
...
Fixes Mozilla bug 1229205
Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
4e31176e14
avformat/riffdec: remove special case for bitrate > 32bit
...
AVCodecContext.bitrate is 64bit
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
32bf6550cb
avformat/riffdec: Initialize bitrate
...
Fixes CID1338334
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Nicolas George
085ab74972
lavf/mpegts: use AVERROR_INVALIDDATA instead of AVERROR(EINTR).
9 years ago
Nicolas George
eb2e4fb674
lavf/lxfdec: use FFERROR_REDO instead of AVERROR(EAGAIN).
9 years ago
Nicolas George
cb14d30240
lavf/mpeg: use FFERROR_REDO instead of AVERROR(EAGAIN).
9 years ago
Nicolas George
0bac7a436b
lavf/flvdec: use FFERROR_REDO instead of AVERROR(EAGAIN).
...
Fix trac ticket #5041 .
9 years ago
Nicolas George
3ab1e5a48c
lavf: add FFERROR_REDO to let demuxers return no packet.
9 years ago
Timo Teräs
64f7db554e
mpegencts: Fix overflow in cbr mode period calculations
...
ts->mux_rate is int (signed 32-bit) type. The period calculations
will start to overflow when mux_rate > 5mbps. This fixes overflows
by converting first to 64-bit type.
Fixes #5044 .
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
James Almer
9ac5beaa86
avformat/mpjpegdec: fix mixed declarations and code
9 years ago
Michael Niedermayer
ec7a3be11e
avformat/utils: Move end_time1 AV_NOPTS_VALUE Check after rescale
...
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d872643cfe
avformat/utils: Check AVFormatContext->duration in compute_chapters_end() before use
...
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
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>
9 years ago
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>
9 years ago
Luca Barbato
d017ed878a
avi: Use the correct data type
...
avio_tell returns an int64_t.
9 years ago
Alex Agranovsky
259c71c199
avformat/mpjpeg: utilize MIME boundary value to detect start of new frame
...
This code is disabled by default so not to regress endpoints sending invalid MIME, but can be enabled via AVOption 'strict_mime_boundary'
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
9 years ago
Alex Agranovsky
79103f2199
avformat/mpjpeg: allow processing of MIME parts without Content-Length header
...
Fixes ticket 5023
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
9 years ago
Carl Eugen Hoyos
d208acf2c8
lavf/rtpenc_jpeg: Less strict check for standard Huffman tables.
...
There can be one or more Huffman table segments DHT.
Reported-by: Andrey Utkin
9 years ago
Aaron Colwell
ec83efd4d3
avformat/matroskadec: Fix sample_aspect_ratio for stereo matroska content
...
matroskaenc.c applies divisors to the display width/height when generating
stereo content. This patch adds the corresponding multipliers to matroskadec.c
so that the original sample aspect ratio can be recovered.
Signed-off-by: wm4 <nfxjfg@googlemail.com>
9 years ago