Commit Graph

147 Commits

Author SHA1 Message Date
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
Michael Niedermayer 25a360286d avcodec/dvbsubdec: merge declaration and init
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-30 23:28:15 +01:00
Michael Niedermayer a2dbf379f0 avcodec/dvbsubdec: make compute_edt user settable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-01 19:51:58 +02:00
Michael Niedermayer 0014541e9a avcodec/dvbsubdec: dont mix integers with pointers
Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-16 15:58:40 +02:00
Anshul Maheshwari 7d1898ebcc avcodec/dvbsubdec: removed unnecessary null check for subtitle
In refrence to coverity defect 1224278

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-02 19:47:14 +02:00
Anshul Maheshwari 263932c084 avcodec/dvbsubdec: fix ignoring blank frame by updating got_output
fix ticket 3737

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 14:35:58 +02:00
Anshul Maheshwari ca2f59e121 avcodec/dvbsubdec: support returning exact end times
fixess part of ticket #2024

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-22 21:06:49 +02:00
Anshul Maheshwari fbb59a3bf4 avcodec/dvbsubdec: Split save_subtitle_set() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15 20:16:49 +02:00
Anshul Maheshwari 77ade55fe5 avcodec/dvbsubdec: add AVClass to context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15 19:59:26 +02:00
Anshul Maheshwari 9a11b33a2d avcodec/dvbsubdec: restructure version check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15 19:56:09 +02:00
Michael Niedermayer 8f4b176c55 avcodec/dvbsubdec: add some basic av_log debuging support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-04 18:09:18 +02:00
Michael Niedermayer 994a582a02 avcodec/dvbsubdec: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 20:08:30 +02:00
Michael Niedermayer 5440151fa4 Merge commit '3dc6272bed7890a49080e18eacf3c7a4a6594b0d'
* commit '3dc6272bed7890a49080e18eacf3c7a4a6594b0d':
  Remove a number of unnecessary dsputil.h #includes

Conflicts:
	libavcodec/h264pred.c
	libavcodec/vc1dsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 18:54:15 +02:00
Diego Biurrun 3dc6272bed Remove a number of unnecessary dsputil.h #includes 2014-04-04 19:08:05 +02:00