Michael Niedermayer
56abf35151
avformat/nutdec: Fix use of uinitialized value
...
Fixes CID1041175
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a23379a0a6
avformat/rtpdec_xiph: Move pkt_len onto one side of the check
...
This is more correct
Fixes CID1271793
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
aa5169935e
avformat/rtpdec_xiph: Check upper bound on len in xiph_handle_packet()
...
Larger packets are not supported and would cause problems later
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
81198a6837
avformat/rtpenc_jpeg: Check remaining buffer size for SOS
...
Fixes CID1238818
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c3671e1d57
avformat/riffenc: Use size_t for strlen in ff_riff_write_info_tag()
...
Also dont generated corrupted output for larger than 4gb strings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Marton Balint
93cc5ca7ed
lavf/img2dec: add option to disable pattern matching
...
Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
59db9e6949
avformat/internal: Fix warning about struct declaration
...
Moving ffio_open2_wrapper() to internal as it uses AVFormatContext
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
da5c6a97bb
riff: Add MultiScope II fourcc MSC2 as MJPEG
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Michael Niedermayer
62a1e0035a
avformat/mlvdec: Use AVFormatContext->open_cb()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a228f7d5e5
avformat/avformat: slightly more verbose documentation for open_cb()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
77ccc9145a
avformat/mov: Use open_cb() if set
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
541d75f9a0
avformat: add callback for opening further files
...
Previous version reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
0382c94f13
id3v2: catch avio_read errors in check_tag
...
Since len is an unsigned int, the comparison is currently treated as
unsigned and thus ignores all errors from avio_read.
Thus cast len to int, which is unproblematic, because at that point len
is between 0 and 4.
This fixes 'Conditional jump or move depends on uninitialised value'
valgrind warnings in is_tag.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2b97cc2e5b
avformat/mov: Pass MovContext into mov_open_dref()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ab6dc86343
avformat/vorbiscomment: Use 64bit int for ff_vorbiscomment_length()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
66f26b3e8e
avformat/matroskaenc: Check ff_vorbiscomment_length in put_flac_codecpriv()
...
Its currently guaranteed to be smaller but its safer to check anyway
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0db5b2b9f8
avformat/oggenc: Check ff_vorbiscomment_length in ogg_write_vorbiscomment()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
40a7700b82
avformat/flacenc: Check length in flac_write_block_comment()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
eca38864a6
avformat/vorbiscomment: Check entry length in ff_vorbiscomment_write()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a633928d47
avformat/subtitles: Use size_t for len
...
string length could theoretically be larger than int
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
17b26308a2
avformat/matroskadec: Use size_t for the variable holding a strlen() value.
...
Should make no difference but is more correct
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
95efc65129
avformat/url: Use size_t for len from strlen()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
32a4177a62
dashenc: replace attribute id with contentType for the AdaptationSet element
...
id should be an integer, not a string. It is also optional, so use
contentType instead which is the proper attribute for these values.
This addresses ticket #4545 , fixing an MPD validation error.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
b8d2630c53
dashenc: Reduce the segment duration if cutting out parts with edit lists
...
This makes sure that the time + duration of the first segment
matches the start time of the next segment for e.g. AAC audio
with encoder delay.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
James Almer
ac1a1cb948
dashenc: replace attribute id with contentType for the AdaptationSet element
...
id should be an integer, not a string. It is also optional, so use
contentType instead which is the proper attribute for these values.
This fixes an MPD validation error.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
004564c930
avformat/wavenc: Check umid length
...
Fixes potential out of array read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ecb4ae7879
avformat/wavenc: fix string length variable types
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d66b623ad0
avformat/nutenc: Fix writing strings larger than 2gb
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a649f36f75
avformat/http: Mark lower_proto as const in http_listen()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3d65570f25
avformat/mxf: Always evaluate PRINT_KEY() arguments at compile time
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
8b42b22222
avformat/mxf: Simplify PRINT_KEY()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Reimar Döffinger
5af621278d
avformat_alloc_context: initialize raw_packet_buffer_remaining_size.
...
This currently works for most users because
avformat_open_input sets it, but this patch fixes any
applications not using that function.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
wm4
379e5603f4
id3v2: Do not export empty APIC description
...
APIC tags always have a description. Tag writers obviously leave it
empty if there is no description. In this case, libavformat would export
"" as title. Do not set the title instead.
10 years ago
Luca Barbato
254f3daba4
nut: Make sure to clean up on read_header failure
...
Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work.
CC: libav-stable@libav.org
10 years ago
Andreas Cadhalpun
4d0ee4962b
avi: Validate sample_size
...
And either error out or set it to 0 if it is negative.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Andreas Cadhalpun
b34257eefd
nut: Check chapter creation in decode_info_header
...
This fixes a segmentation fault when accessing the metadata.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
CC: libav-stable@libav.org
10 years ago
wm4
b697b297b7
id3v2: do not export APIC description if empty
...
APIC tags always have a description. Tag writers obviously leave it
empty if there is no description. In this case, libavformat would export
"" as title. Do not set the title instead.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
2279de6eca
lavf/img2dec: Autodetect qdraw images.
10 years ago
Michael Niedermayer
3e14ed05f1
avformat/internal: always check arguments of hex_dump_debug()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
374cf93548
avformat/asfdec: do not define print_guid() to nothing
...
This avoid potential warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e0010bb91f
mux: Do not leave stale side data pointers in ff_interleave_add_packet()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
6c8c7c2462
dump: Print AVAudioServiceType side data
10 years ago
Vittorio Giovara
7b734ee55d
lavf: Open PICT images with Quickdraw
...
Update the pictor test to use the pictor codec, as both formats share
the .pic file extension.
10 years ago
Carl Eugen Hoyos
e31cdb5cc8
lavf/riff: Add MultiScope II fourcc MSC2 as MJPEG.
10 years ago
Michael Niedermayer
9d4fdfe24c
avformat/matroskaenc: Use avoid_negative_ts_use_pts if no stream writes dts
...
This reduces the number of cases where timestamps need to be shifted
Fixes Ticket4487
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7ac5c38ec5
avformat/mux: Add avoid_negative_ts_use_pts
...
This allows using pts instead of dts for negative TS avoidance
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c7369f3a4b
avformat/avidec: print a warning for negative sample_size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
ca234639ac
avidec: avoid infinite loop due to negative ast->sample_size
...
If max in clean_index is set to a negative ast->sample_size, the
following loop never ends:
while (max < 1024)
max += max;
Thus set ast->sample_size to 0 if it would otherwise be negative.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
0eec40b713
avidec: check for valid bit_rate range
...
If bit_rate is negative, it can trigger an av_assert2 in av_rescale_rnd.
Since av_rescale returns int64_t, but st->codec_bit_rate is int, it can
also overflow into a negative value.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
8ad04d24c8
lavf/apngenc: Fix png remuxing by using default extension apng.
10 years ago