summaryrefslogtreecommitdiff
path: root/libavcodec/microdvddec.c
Commit message (Collapse)AuthorAge
* avcodec: Make init-threadsafety the defaultAndreas Rheinhardt2022-07-18
| | | | | | | | | | | and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Constify AVPacket in decode_sub cbAndreas Rheinhardt2022-04-05
| | | | | | No subtitle decoder ever modifies the AVPacket given to it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-05
| | | | | | | | | | | This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec.decode_subAndreas Rheinhardt2022-04-05
| | | | | | | | | This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVSubtitle *sub = data;" line for subtitle decoders. Its only downside is that it increases sizeof(FFCodec), yet this can be more than offset lateron. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-21
| | | | | | | | | | | | | | | | Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-21
| | | | | | | | | | Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Mark ff_ass_subtitle_header based decoders as init-threadsafeAndreas Rheinhardt2021-05-02
| | | | | | | ff_ass_subtitle_header_full() just uses av_asprintf() and is therefore thread-safe itself. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/microdvddec: limit style characters in parsingMichael Niedermayer2018-08-12
| | | | | | | | Fixes: Timeout Fixes: 9293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MICRODVD_fuzzer-5643972541153280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-29
|
* lavc: allow subtitle text format to be ASS without timingClément Bœsch2016-02-26
|
* lavc/ccaption_dec: improve default styleClément Bœsch2016-01-10
| | | | Use monospaced font, and a black box outline.
* avcodec/microdvddec: Check for string end in 'P' caseMichael Niedermayer2015-11-07
| | | | | | | | Fixes out of array read Fixes: a9502b60f4cecc19475382aee255f73c/asan_heap-oob_1e87fba_2548_a8ad47f6dde36644fe9cdc444d4632d0.sub Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/microdvddec: support non persistent italic marker '/'Clément Bœsch2014-11-23
| | | | | | Inspired from a patch by Michal Wazgird <mplayer@cyryl.net> See https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2014-November/072772.html
* avcodec/microdvddec: support various broken form of color tagsClément Bœsch2014-11-23
| | | | | | Inspired by a patch from Michal Wazgird <mplayer@cyryl.net> See https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2014-November/072772.html
* avcodec/ass: add ASS trailing \r\n in one single placeClément Bœsch2014-10-19
|
* avcodec/ass: assume raw=0 in ff_ass_add_rect_bprintClément Bœsch2014-10-19
|
* avcodec/microdvddec: remove old compat codeClément Bœsch2014-09-27
|
* avcodec/microdvddec: add some memory checksClément Bœsch2014-09-21
|
* avcodec/microdvddec: indent fixClément Bœsch2014-09-14
|
* microdvd: sanitize AVPackets.Clément Bœsch2012-12-31
| | | | | | | | | | | | | | | | | | | | Current MicroDVD AVPackets contain timing information and trailing line breaks. The data is now only composed of the markup data. Doing this consistently between text subtitles decoders allows to use different codec for various formats. For instance, MicroDVD markup is sometimes found in some VPlayer files. Also, generally speaking, the subtitles text decoders have no use of these timings (and they must not use them since it would break any user timing adjustment). Technically, this is a major ABI break. In practice, a mismatching lavf/lavc will now error out for MicroDVD decoding. Supporting both formats requires unnecessary complex and fragile code. FATE needs update because line breaks in the ASS file were "\n" (because that's what is used in the original file). ASS format expect "\r\n" line breaks; this commit fixes this issue. Also note that this "\r\n" trailing need to be moved at some point from the decoders to the ASS muxer.
* Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavc/microdvddec: support "DEFAULT" properties.Clément Bœsch2012-06-29
|
* lavc/microdvddec: fix color parsing.Clément Bœsch2012-06-15
|
* lavc/microdvddec: properly reset non persistent color tag.Clément Bœsch2012-06-15
|
* lavc: switch from ts_end to duration in ff_ass_add_rect.Clément Bœsch2012-05-29
| | | | Make possible a end-to-presentation duration.
* lavc: add MicroDVD decoder.Clément Bœsch2012-04-27
Based on my MicroDVD->ASS conversion code from MPlayer (sub/subassconvert.c).