summaryrefslogtreecommitdiff
path: root/libavformat/icodec.c
Commit message (Collapse)AuthorAge
* icodec: correctly check avio_read return valueAndreas Cadhalpun2016-11-10
| | | | | | | | | | | It can read less than the requested amount, in which case buf contains uninitialized data, causing problems like segmentation faults later on. Also make sure that image->size is positive, so that it can't match a negative error code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* icodec: add ico_read_close to fix leaking ico->imagesAndreas Cadhalpun2016-11-09
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* icodec: fix leaking pkt on errorAndreas Cadhalpun2016-11-09
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
| | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avformat/icodec: Fix crash probing fuzzed fileMark Harris2016-02-20
| | | | | | | | Avoid invalid memory read/crash when frame offset >= 0xfffffff8. Base64-encoded example: AAABADAwMDAwMAAAMAAwMDAw/P///w== (The previous commit verifies that p->buf_size >= 22.) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/icodec: ico probe with unknown dataMark Harris2016-02-20
| | | | | | | | | | | | | | Fix cases where unknown data (data beyond p->buf_size) could produce a higher ico probe score than if the unknown data was known and valid. For example: Header: OK, 2 frames Frame 0: Unknown (offset points beyond end of probe buffer) Frame 1: Invalid Previously this example had a score of 25, even though the score would be 1 if the unknown frame was known to be valid or 0 if it was known to be invalid. For this example the score is now 1. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/icodec: Improve autodetection.Carl Eugen Hoyos2016-01-18
| | | | | | Avoids misdetection of MPEG (B-)frames. Reviewed-by: Michael Bradshaw
* Return EOF for ICO when the end is reachedMichael Bradshaw2015-09-24
|
* avformat/ico: use avmalloc(z)_array()Michael Niedermayer2014-04-16
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/icodec: reduce score returned on probingMichael Niedermayer2013-11-08
| | | | | | | | The ico probe function is pretty weak just checking a few bytes for being 0, 1 or not 0 Fixes probetest failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavc & lavf: replace deprecated av_log* functionsPaul B Mahol2013-03-15
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* 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>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (71 commits) movenc: Allow writing to a non-seekable output if using empty moov movenc: Support adding isml (smooth streaming live) metadata libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set sunrast: Document the different Sun Raster file format types. sunrast: Add a check for experimental type. libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat lavf: remove disabled FF_API_SET_PTS_INFO cruft lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft lavf: remove disabled FF_API_REORDER_PRIVATE cruft lavf: remove disabled FF_API_SEEK_PUBLIC cruft lavf: remove disabled FF_API_STREAM_COPY cruft lavf: remove disabled FF_API_PRELOAD cruft lavf: remove disabled FF_API_NEW_STREAM cruft lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft lavf: remove disabled FF_API_MUXRATE cruft lavf: remove disabled FF_API_FILESIZE cruft lavf: remove disabled FF_API_TIMESTAMP cruft lavf: remove disabled FF_API_LOOP_OUTPUT cruft lavf: remove disabled FF_API_LOOP_INPUT cruft lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft ... Conflicts: doc/APIchanges libavcodec/8bps.c libavcodec/avcodec.h libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/options.c libavcodec/sunrast.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/h264_deblock.asm libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/avformat.h libavformat/avio.c libavformat/avio.h libavformat/aviobuf.c libavformat/dv.c libavformat/mov.c libavformat/utils.c libavformat/version.h libavformat/wtv.c libavutil/Makefile libavutil/file.c libswscale/x86/input.asm libswscale/x86/swscale_mmx.c libswscale/x86/swscale_template.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>
* ico: favour BITMAPHEADER dimensions over IconEntry dimensionsPeter Ross2012-01-13
| | | | | | Fixes ticket 759. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ico: reject icon entries that are smaller than sizeof(BITMAPHEADER)Peter Ross2012-01-12
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ico: ignore IconEntry.bpp value, and favour BITMAPHEADER.NumColors value ↵Peter Ross2012-01-12
| | | | | | | | over that in IconEntry Fixes ticket 905. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* ico: consider IconEntry.NumColors of 255 to be ambiguousPeter Ross2012-01-12
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Microsoft Windows ICO demuxerPeter Ross2011-12-04
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>