summaryrefslogtreecommitdiffstats
path: root/libavcodec/dvdsubdec.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/dvdsubdec: fix accessing dangling pointerswm42015-01-081-9/+3
| | | | | | | | | | | | | | | dvdsub_decode() can call append_to_cached_buf() 2 times, the second time with ctx->buf as argument. If the second append_to_cached_buf() reallocs ctx->buf, the argument will be a pointer to the previous, freed block. This can cause invalid reads at least with some fuzzed files - and possibly with valid files. Since packets can apparently not be larger than 64K (even if packets are combined), just use a fixed size buffer. It will be allocated as part of the DVDSubContext, and although some memory is "wasted", it's relatively minimal by modern standards and should be acceptable. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/dvdsubdec: error on bitmaps with size 0wm42015-01-081-0/+3
| | | | | | | Attemtping to decode them could lead to invalid writes with some fuzzed samples. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/dvdsubdec: fix out of bounds accesseswm42015-01-051-4/+9
| | | | | | | | The code blindly trusted buffer offsets read from the file in the RLE decoder. Explicitly check the offset. Also error out on other RLE decoding errors. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/dvdsubdec: Avoid strerror() due to thread safteyMichael Niedermayer2014-12-131-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'd466d82faaf6e0e57a3a4be5e38e3902ef251ac3'Michael Niedermayer2014-11-211-6/+6
|\ | | | | | | | | | | | | | | | | | | | | * commit 'd466d82faaf6e0e57a3a4be5e38e3902ef251ac3': dvdsubdec: Do not leak on failure path Conflicts: libavcodec/dvdsubdec.c See: 7fa9f7ef1c2f0cee81ec6ea6a4ff10af4c4fc62c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dvdsubdec: Do not leak on failure pathLuca Barbato2014-11-211-3/+6
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1198262
| * cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-151-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/dvdsubdec: Check all fseek()s return codesMichael Niedermayer2014-11-161-3/+12
| | | | | | | | | | | | Fixes CID1254660 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/dvdsubdec: New option for obtaining global palette from .IFO file ↵Shin-ichi Toyama2014-11-151-0/+56
| | | | | | | | | | | | | | (experimental) Suggested-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavcodec/dvdsubdec: Add option forced_subs_only to only decode forced ↵Nicholas Robbins2014-09-221-0/+5
| | | | | | | | | | | | | | subtitle frames. Signed-off-by: Nicholas Robbins <nickrobbins@yahoo.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/dvdsubdec: fix VD/SD identifier nameMichael Niedermayer2014-09-191-2/+2
| | | | | | | | | | Found-by: Nicholas Robbins <nickrobbins-at-yahoo.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/dvdsubdec: Dont mix integers with pointersMichael Niedermayer2014-08-161-2/+2
| | | | | | | | | | Reviewed-by: James Darnley <james.darnley@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-151-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-151-2/+2
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avcodec/dvdsubdec: free subtitle rectangles if nothing is outputMichael Niedermayer2014-07-311-0/+1
| | | | | | | | | | Fixes assertion failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/dvdsubdec: fix alpha in debuging codeOliver Fromme2014-07-041-5/+9
| | | | | | | | | | | | | | improve the debugging function for saving subtitles to PPM files: Actually use the alpha channel. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/dvdsubdec: Fix off-by-one errorOliver Fromme2014-07-041-1/+1
| | | | | | | | | | | | | | | | Fix an off-by-one error that causes the height of decoded subtitles to be too small, thus cutting off the lowest row of pixels. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3dc6272bed7890a49080e18eacf3c7a4a6594b0d'Michael Niedermayer2014-04-051-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '3dc6272bed7890a49080e18eacf3c7a4a6594b0d': Remove a number of unnecessary dsputil.h #includes Conflicts: libavcodec/h264pred.c libavcodec/vc1dsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove a number of unnecessary dsputil.h #includesDiego Biurrun2014-04-041-1/+1
| |
* | Merge commit '05563ccacc98fd185affdbf8cbaf094caf36b852'Michael Niedermayer2014-03-141-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '05563ccacc98fd185affdbf8cbaf094caf36b852': dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl names Conflicts: libavcodec/bit_depth_template.c libavcodec/motionpixels_tablegen.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: cosmetics: Lose camelCase on ff_cropTbl and ff_squareTbl namesDiego Biurrun2014-03-131-1/+1
| | | | | | | | Also switch from "tbl" to "tab" name suffixes.
* | dvdsub_parse_extradata: fix memleakMichael Niedermayer2013-12-101-1/+3
| | | | | | | | | | Fixes CID1135765 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavcodec/dvdsubdec: remove exit() call in debug codeMichael Niedermayer2013-11-081-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-071-3/+0
|\ \ | |/ | | | | | | | | | | * qatar/master: Remove #undefs for formerly forbidden system functions Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove #undefs for formerly forbidden system functionsDiego Biurrun2013-11-071-3/+0
| | | | | | | | | | The macros forbidding the system functions no longer exist, obviating the need for the #undefs.
* | Merge commit 'd6da372984c87fd6288c148c291065d6032ceda3'Michael Niedermayer2013-11-011-3/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd6da372984c87fd6288c148c291065d6032ceda3': eacmv: stop using deprecated avcodec_set_dimensions dvdsubdec: stop using deprecated avcodec_set_dimensions dvdec: stop using deprecated avcodec_set_dimensions dpx: stop using deprecated avcodec_set_dimensions Conflicts: libavcodec/dpx.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/eacmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dvdsubdec: stop using deprecated avcodec_set_dimensionsAnton Khirnov2013-10-311-3/+7
| |
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-1/+1
| |
* | avcodec/dvdsubdec: reconstruct incomplete SPU packets.Clément Bœsch2013-10-041-0/+49
| |
* | avcodec/dvdsubdec: extract every subtitle in a different file (debug).Clément Bœsch2013-10-041-1/+9
| | | | | | | | | | Even thought a generic solution would be more relevant, this is currently helpful while debugging.
* | avcodec/dvdsubdec: factor out rectangles reset.Clément Bœsch2013-10-041-18/+17
| |
* | Rename "AVClass class" as "AVClass component_class".Carl Eugen Hoyos2013-06-301-2/+2
| | | | | | | | The aix header math.h defines "extern int class()" for C.
* | Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'Michael Niedermayer2013-05-161-2/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110': vf_aspect: use the name 's' for the pointer to the private context Remove commented-out debug #define cruft Conflicts: libavcodec/4xm.c libavcodec/dvdsubdec.c libavcodec/ituh263dec.c libavcodec/mpeg12.c libavfilter/avfilter.c libavfilter/vf_aspect.c libavfilter/vf_fieldorder.c libavformat/rtmpproto.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove commented-out debug #define cruftDiego Biurrun2013-05-161-2/+0
| |
* | make the ordering of the return type and av_cold consistentMichael Niedermayer2013-05-051-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'Michael Niedermayer2013-05-051-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487': avcodec: Add av_cold attributes to init functions missing them Conflicts: libavcodec/aacpsy.c libavcodec/atrac3.c libavcodec/dvdsubdec.c libavcodec/ffv1.c libavcodec/ffv1enc.c libavcodec/h261enc.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/h264pred.c libavcodec/libschroedingerenc.c libavcodec/libxvid_rc.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/proresdsp.c libavcodec/rangecoder.c libavcodec/videodsp.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-1/+2
| |
* | Merge commit '9e0f14f16cfc9456a691655fda7d01090bffe47e'Michael Niedermayer2013-04-081-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '9e0f14f16cfc9456a691655fda7d01090bffe47e': lavc: Make pointers to ff_cropTbl const vp3: Embed idct_permutation array directly in VP3DecoderContext Conflicts: libavcodec/bit_depth_template.c libavcodec/vp3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Make pointers to ff_cropTbl constMartin Storsjö2013-04-081-1/+1
| | | | | | | | | | | | There's no point in these pointers not being const. Signed-off-by: Martin Storsjö <martin@martin.st>
| * Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-071-1/+2
| | | | | | | | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
| * dvdsubdec: parse the size from the extradataClément Bœsch2013-01-191-0/+6
| | | | | | | | | | Signed-off-by: Alexandra Khirnova <alexandra.khirnova@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Remove incorrect use of ctype.h functions.Reimar Döffinger2013-03-031-1/+2
| | | | | | | | | | | | | | As far as I can tell the code should not change behaviour depending on locale in any of these places. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e'Michael Niedermayer2013-01-161-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e': h264: add 3 pixels below for subpixel filter wait position dvdsubdec: Support palette in mkv Conflicts: libavcodec/dvdsubdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dvdsubdec: Support palette in mkvJoakim Plate2013-01-151-5/+55
| | | | | | | | | | | | | | Matroska stores palette information as plain text in extradata. Signed-off-by: Alexandra Khirnova <alexandra.khirnova@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | dvdsubdec: use unsigned shifts to avoid shifting into the sign bitMichael Niedermayer2013-01-121-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/dvdsubdec: accept palette from options.Nicolas George2012-12-051-10/+45
| | | | | | | | | | On DVDs, the palette is part of the IFO file and therefore not available when reading from a dumped VOB file.
* | Merge commit '9a07c1332cfe092b57b5758f22b686ca58806c60'Michael Niedermayer2012-11-031-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9a07c1332cfe092b57b5758f22b686ca58806c60': parser: Move Doxygen documentation to the header files PGS subtitles: Expose forced flag x86: PMINUB: port to cpuflags Conflicts: libavcodec/avcodec.h libavcodec/pgssubdec.c libavcodec/version.h libavcodec/x86/ac3dsp.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/dvdsubdec: parse the size from the extradata.Clément Bœsch2012-09-041-0/+6
| |
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
OpenPOWER on IntegriCloud