Michael Niedermayer
dd357d76e5
avformat/wtvdec: Avoid (32bit signed) sectors
...
Fixes: left shift of negative value -14614752
Fixes: 15174/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5670543606415360
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Carl Eugen Hoyos
4d8875ec23
lavf: Constify the probe function argument.
...
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
6 years ago
Daniel Kucera
feed201849
libavformat/wtvdec: return AVERROR_EOF on EOF
...
Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
7 years ago
Anton Khirnov
78a7af823b
Use the new AVIOContext destructor.
...
(cherry picked from commit 6f554521af
)
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Michael Niedermayer
cc5e5548df
avformat/wtvdec: Check pointer before use
...
Fixes out of array read
Fixes: 049fdf78565f1ce5665df236d90f8657/asan_heap-oob_10a5a97_1026_42f9d4855547329560f385768de2f3fb.wtv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
92dfeb5c31
avformat/wtvdec: Set AVFMTCTX_NOHEADER
...
Needed for noStreams.wtv unless something else forces continued parsing (like looking for more than 1
frame in attachments)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Timothy Gu
e5a6dcac47
wtvdec: Removed unused variable
9 years ago
popcornmix
def56677e5
wtv: Speed up wtv index creation
...
The index creation is O(N^2) with number of entries (typically thousands).
On a Pi this can take more than 60 seconds to execute for a recording of a few hours.
By replacing with an O(N) loop, this takes virtually zero time
Liked-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d44e0d8b93
avformat/wtvdec: Use 64bit for ret to avoid overflow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Rodger Combs
62e95757d5
wtvdec: fix integer overflow resulting in errors with large files
...
This fixes a regression in 9fbc613f0d
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
443bd2715d
avformat/wtvdec: Use av_freep() avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Thomas Volkert
00d7555f34
wavdec: RIFX file format support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
6efe4137ce
Stop demuxing wtv on eof.
...
Fixes ticket #3991 .
Fixes ticket #3995 .
Fixes ticket #3997 .
Reviewed-by: Peter Ross
Reviewed-by: Paul B Mahol
10 years ago
Peter Ross
9b8eedd736
avformat/wtvdec: seek over broken chunks
...
Fixes ticket #3898
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
d34ec64a22
replace calls to url_feof() with avio_feof()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
be098f6237
avformat/wtvdec: ignore mpeg2 extradata
...
Files produced by windows media center contain meaningless mpeg1 sequence
header. The mpeg2 decoder detects the presence mpeg1 sequence header start
codes and attempts to decode the stream as mpeg1. (This problem introduced
in 73a2d16b.)
Fixes ticket #3601 .
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
0cc685e3ad
avformat/wtvdec: populate codec_tag from BITMAPINFOHEADER
...
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
8348bd198f
avformat/wtvdec: ignore MPEG2VIDEO extradata when count is invalid
...
Fixes ticket #3522 .
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
73a2d16bfa
avformat/wtvdec: demux mpeg2 extradata
...
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
686b6dc33a
wtv: make ff_format_videoinfo2 visible to wtv encoder
...
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
d08ea75a82
wtvenc: test avio_size() validity
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Peter Ross
8baaa924bd
wtvdec: when testing for truncated files, actually check the .wtv file size
...
Previously the demuxer was testing against avio_tell, and this would generate
many false warnings.
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
fec6d547cc
avformat/wtvdec: drop SHIFT_SECTOR_BITS() macro
...
it just wraps around a bitwise shift, and makes the code harder to read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
a0d13d84a9
Add some necessary casts in the wtv demuxer.
...
This reverts e8023dba
, fixes ticket #3049 .
11 years ago
Michael Niedermayer
68ff528969
avformat/wtvdec: fix doxygen comments
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3317414fc1
wtvdec: fix integer overflow
...
Fixes CID968583
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Peter Ross
a572cc8c7a
wtvdec: prevent memory leak in get_tag()
12 years ago
Peter Ross
8b4842c2e2
wtvdec: warn about truncated files
12 years ago
Peter Ross
361ecb6176
wtvdec: ignore WM/MediaThumbType metadata entry
...
This tag is used by Windows Media Centre in displaying the thumbnail,
and should be transformed into FFmpeg metadata string.
12 years ago
Peter Ross
508836932f
wtvdec: demux thumbnail picture to AVStream.attached_pic
12 years ago
Peter Ross
95015634f5
wtv: permit root table and first sectors to be located beyond 2GB boundary
...
Fixes ticket #2025 .
Signed-off-by: Peter Ross <pross@xvid.org>
12 years ago
Michael Niedermayer
ec79b1fc88
wtvdec: fix null pointer dereference
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Peter Ross
e6ef628b1e
wtv: move duplicated guids into wtv.c
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Peter Ross
1701a22fce
wtv: rename ff_stream_guid to ff_SBE2_STREAM_DESC_EVENT
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Peter Ross
8469fc17e2
wtvdec: display warning for encrypted wtv files (instead of 'unsupported chunk' messages)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e47024d72f
wtvdec: fix memleak on error
...
Fixes CID718002
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Derek Buitenhuis
1d4c4b0fbc
wtvdec: Remove unused strings.h header
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Reimar Döffinger
dddd006cab
wtvdec: set correct codec ID for CC streams.
...
Closed caption data is definitely not teletext.
Since it contains a EIA-608 compatibility stream,
the EIA_608 codec ID is at least not completely wrong.
Fixes subtitle playback in MPlayer with the sample in
trac ticket #1482 .
To fix the ticket itself I expect FFmpeg will need
a closed-caption to SRT decoder first.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Lou Logan
b22ecbc6a5
cosmetics: various spelling fixes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
c855ce2671
lavf/wtvdec: add missing { } around if.
...
This should fix the current failures spotted by FATE.
13 years ago
Peter Ross
c4e0e74438
wtvdec: return error when filetime_to_iso8601/crazytime_to_iso8601 conversion fails
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
76853a3e0c
libavformat: ff_get_bmp_header: return esize too
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fd2127ad53
wtvdec: Check that stream private context has been allocated before use.
...
This fixes a null ptr dereference with attachments
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c42efad3c3
wtvdec: fix name_size check to consider integer overflows.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
742b660eb7
wtvdec: fix a few memleaks as show by valgrind with the FATE test.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Jean First
f2eb2e5c4f
wtvdec: use intfloat.h instead of intfloat_readwrite.h
...
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
215b7724e7
lavf: rename remaining av_set_pts_info() to avpriv_set_pts_info().
13 years ago
Peter Ross
3b4798a873
wtvdec: ignore another known guid
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Joakim Plate
7bcd81299a
[wtv] Check return value of avio_seek and avoid modifying state if it fails
13 years ago
zhentan feng
42d4df06e1
WTV muxer (1_extract_wtv_common_code.patch)
14 years ago