Michael Niedermayer
8a69f2602f
avcodec/dvbsubdec: Check entry_id
...
Fixes: randomly writing over the array end
Fixes: 1473/clusterfuzz-testcase-minimized-5768907824562176
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-11 15:51:08 +02:00
Michael Niedermayer
0075d9eced
avcodec/dvbsubdec: check region dimensions
...
Fixes: 1408/clusterfuzz-testcase-minimized-6529985844084736
Fixes: integer overflow
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-08 15:28:26 +02:00
Michael Niedermayer
b02027c79d
avcodec/dvbsubdec: Replace fprintf(stderr) by av_log()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-05 23:57:08 +02:00
Clément Bœsch
7650bccdb1
Merge commit 'b34c6cd57a2e8aad5f773aea933f77883de320ec'
...
* commit 'b34c6cd57a2e8aad5f773aea933f77883de320ec':
dvbsub: cosmetics: Group all debug code together
Merged-by: Clément Bœsch <u@pkh.me>
2017-04-03 21:02:54 +02:00
Clément Bœsch
9f7ba0ac9d
Merge commit 'b8cd7a3c8df2c3aac8d7a0b5a02d83caf61bd769'
...
* commit 'b8cd7a3c8df2c3aac8d7a0b5a02d83caf61bd769':
dvbsub: Check for errors from system()
printf(...) replaced with fprintf(stderr, ...) for logging errors.
Merged-by: Clément Bœsch <u@pkh.me>
2017-04-03 21:01:40 +02:00
Clément Bœsch
ff66ba6feb
Merge commit '7effebde78977fafce935776153ea2f7c0981fa3'
...
* commit '7effebde78977fafce935776153ea2f7c0981fa3':
dvbsubdec: Remove disabled, near-duplicate debug code
Merged-by: Clément Bœsch <u@pkh.me>
2017-03-19 16:10:17 +01:00
Diego Biurrun
b34c6cd57a
dvbsub: cosmetics: Group all debug code together
2016-11-23 07:40:46 +01:00
Diego Biurrun
b8cd7a3c8d
dvbsub: Check for errors from system()
...
libavcodec/dvbsubdec.c:145:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
libavcodec/dvbsubdec.c:148:5: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
2016-11-23 07:36:32 +01:00
Andreas Cadhalpun
c82b8ef0e4
dvbsubdec: fix division by zero in compute_default_clut
...
This problem was introduced in commit
4b90dcb849
.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-10 21:01:59 +01:00
Diego Biurrun
7effebde78
dvbsubdec: Remove disabled, near-duplicate debug code
2016-08-17 12:16:42 +02:00
Diego Biurrun
e723dce6f8
dvbsubdec: Use NULL instead of 0 as pointer value
2016-08-03 08:26:40 +02:00
Clément Bœsch
a4403e49b9
Merge commit 'b7e64fba7f37cc0399beae844f0a5dbef9219376'
...
* commit 'b7e64fba7f37cc0399beae844f0a5dbef9219376':
Reduce the scope of some variables
Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 22:40:56 +02:00
Diego Biurrun
b7e64fba7f
Reduce the scope of some variables
...
This avoids unused variable warnings after the next version bump.
Also drop a trace level av_log() call that is in the way.
2016-05-11 12:21:25 +02:00
Clément Bœsch
fb99ef0bd3
avcodec: use AV_OPT_TYPE_BOOL in a bunch of places
2015-12-04 15:37:05 +01:00
Hendrik Leppkes
ee573b4d31
Merge commit 'a17a7661906ba295d67afd80ac0770422e1b02b3'
...
* commit 'a17a7661906ba295d67afd80ac0770422e1b02b3':
lavc: Add data and linesize to AVSubtitleRect
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-22 21:41:53 +02:00
Vittorio Giovara
a17a766190
lavc: Add data and linesize to AVSubtitleRect
...
Use the new fields directly instead of the ones from AVPicture.
This removes a layer of indirection which serves no pratical purpose
whatsoever, and will help in removing AVPicture structure completely
later.
Every subtitle encoder/decoder seamlessly points to the new arrays,
so it is possible to deprecate AVSubtitleRect.pict.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-21 12:02:29 +02:00
Hendrik Leppkes
fbd71bba85
Merge commit '1da2a20763ae9ca579d5fd20763065871ddf6311'
...
* commit '1da2a20763ae9ca579d5fd20763065871ddf6311':
dvbsubdec: Fix function return type
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-05 11:25:40 +02:00
Vittorio Giovara
1da2a20763
dvbsubdec: Fix function return type
2015-10-04 13:07:12 +02:00
Ronald S. Bultje
6471040f56
FF_OPT_TYPE_* -> AV_OPT_TYPE_*.
2015-08-18 11:48:49 -04:00
Michael Niedermayer
d21ab8e411
avcodec/dvbsubdec: Print field lens in case they are too lerge
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-13 01:50:08 +02:00
Carl Eugen Hoyos
daf2c35f52
lavc: Remove newline from avpriv_request_sample() calls.
2015-08-11 22:50:45 +02:00
Michael Niedermayer
e5774f28d1
avcodec/dvbsubdec: Do not stop decoding at a invalid depth
...
This corrects parsing the later elements
Fixes Ticket4754
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-05 00:16:43 +02:00
Carl Eugen Hoyos
087c0a0a93
lavc/dvbsub: Do not fail on clut depth 0.
...
Fixes ticket #4752 .
2015-08-04 15:01:22 +02:00
Michael Niedermayer
3f87a17063
avcodec/dvbsubdec: Allow selecting the substream, or all substreams
...
Fixes Ticket 2161
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-04 14:24:13 +02:00
Michael Niedermayer
1fc20af6af
avcodec/dvbsubdec: Implement display definition segment fallback from ETSI EN 300 743 V1.3.1
...
Fixes: subtitles.ts
Fixes: Ticket679
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-29 18:02:07 +02:00
Michael Niedermayer
d41dceb14e
avcodec/dvbsubdec: Add option to select when to computer clut (always/never/"if needed")
...
Reviewed-by: Anshul <anshul.ffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 00:02:48 +02:00
Michael Niedermayer
4b90dcb849
avcodec/dvbsubdec: Compute default CLUT based on bitmap analysis
...
Fixes displaying subtitles before any CLUT has been received
Fixes Ticket153
This will of course not display these initial subtitles in the correct
color (as that is not known at that point) but they should look clean
and not corrupted
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-26 14:39:55 +02:00
banastasov
debf4d6e67
avcodec/dvbsubdec: Fix buf_size check in dvbsub_parse_display_definition_segment()
...
Fixes Ticket4326
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-30 04:29:58 +02:00
Michael Niedermayer
9f0b898e82
avcodec/dvbsubdec: Clear w/h/size on region buffer allocation failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-14 23:25:39 +02:00
Michael Niedermayer
e06dde52d7
avcodec/dvbsubdec: Do not return a value from a function returning void
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-26 13:47:12 +02:00
Michael Niedermayer
8f7b022c8c
Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
...
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
lavc: Replace av_dlog and tprintf with internal macros
Conflicts:
libavcodec/aacdec.c
libavcodec/audio_frame_queue.c
libavcodec/bitstream.c
libavcodec/dcadec.c
libavcodec/dnxhddec.c
libavcodec/dvbsubdec.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/get_bits.h
libavcodec/gifdec.c
libavcodec/h264.h
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/h264_loopfilter.c
libavcodec/h264_refs.c
libavcodec/imc.c
libavcodec/interplayvideo.c
libavcodec/jpeglsdec.c
libavcodec/libopencore-amr.c
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_parser.c
libavcodec/pngdec.c
libavcodec/ratecontrol.c
libavcodec/rv10.c
libavcodec/svq1dec.c
libavcodec/vqavideo.c
libavcodec/wmadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
2015-04-19 12:41:59 +01:00
Michael Niedermayer
c5b6b711b2
Merge commit '607ad990d31e6be52980970e5ce8cd25ab3de812'
...
* commit '607ad990d31e6be52980970e5ce8cd25ab3de812':
dvbsubdec: check memory allocations and propagate errors
Conflicts:
libavcodec/dvbsubdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 20:25:40 +01:00
Vittorio Giovara
607ad990d3
dvbsubdec: check memory allocations and propagate errors
2015-01-27 15:26:37 +00:00
Michael Niedermayer
8de0990e9f
avcodec/dvbsubdec: Check get_region() return value
...
Fixes null pointer dereference with DEBUG enabled
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-17 16:33:02 +01:00
Michael Niedermayer
1bf747ae84
avcodec/dvbsubdec: Return proper error codes from more functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 19:24:27 +01:00
Michael Niedermayer
ebe3a41ea3
avcodec/dvbsubdec: Add some av_malloc() failure checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 19:21:58 +01:00
Michael Niedermayer
ce800d4695
avcodec/dvbsubdec: Remove redundant "DVBSub error" prefix
...
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-06 02:03:08 +01:00
Michael Niedermayer
4ba0141921
avcodec/dvbsubdec: Pass context to av_log()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-05 20:33:57 +01:00
Michael Niedermayer
d03867c248
avcodec/dvbsubdec: av_assert* instead of assert()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-12 20:08:24 +01:00
Michael Niedermayer
39dfe6801a
avcodec/dvbsubdec: Cleanup on *malloc failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-12 17:54:52 +01:00
Michael Niedermayer
287eb69973
Merge commit '443502aed8b814d883825e52e91e4f018955aa66'
...
* commit '443502aed8b814d883825e52e91e4f018955aa66':
dvbsubdec: move shared codepath
Conflicts:
libavcodec/dvbsubdec.c
The merged code is ignored and the factorization redone with
the code that is in FFmpeg.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-11 23:08:55 +01:00
Michael Niedermayer
e0c36f5825
avcodec/dvbsubdec: Fix 8bit non_mod case
...
Untested, i failed to find a sample which triggers this case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-11 22:57:01 +01:00
Michael Niedermayer
2813dabdd4
avcodec/dvbsubdec: use av_freep() for saftey
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-11 22:20:20 +01:00
Michael Niedermayer
4809ac75fc
Merge commit '2383323661f3b8342b2c4d356fcfe8c5d1b045f8'
...
* commit '2383323661f3b8342b2c4d356fcfe8c5d1b045f8':
dvbsubdec: improve error checking
Conflicts:
libavcodec/dvbsubdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-11 22:19:54 +01:00
Michael Niedermayer
6229f7823e
avcodec/dvbsubdec: Add return code to save_subtitle_set()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-11 22:15:14 +01:00
Vittorio Giovara
443502aed8
dvbsubdec: move shared codepath
...
CC: libav-stable@libav.org
Bug-Id: CID 1238839
2014-11-11 11:49:54 +01:00
Vittorio Giovara
2383323661
dvbsubdec: improve error checking
...
Use av_mallocz_array instead of iterating and check the returned memory.
Check returned memory and cleanly exit in case of error during the loop.
Avoid a null pointer dereference for invalid data.
CC: libav-stable@libav.org
Bug-Id: CID 29575
2014-11-11 11:49:54 +01:00
Jernej Fijačko
1bdd21d975
dvbsubdec: add missing break
...
Fix a memory leak too.
CC: libav-stable@libav.org
Bug-Id: CID 732230
2014-11-11 11:49:54 +01:00
Michael Niedermayer
adfc3b81b1
avcodec/dvbsubdec: use av_freep() to avoid leaving stale pointers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 23:29:33 +01:00