aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | avformat/utils: Fix division by 0Michael Niedermayer2015-02-091-2/+2
| | | | | | | | | | | | | | Fixes: signal_sigsegv_14999ef_1188_cov_2888512890_SVA_CL1_E.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/utils: fix if_( styleStefano Sabatini2015-02-041-1/+1
| |
* | avformat: fix mode of img2dec.c and utils.cMichael Niedermayer2015-02-031-0/+0
| | | | | | | | | | Found-by: jamrial Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/img2dec: remove the non-negative number requirement for ↵Liviu Oniciuc2015-02-031-0/+2
| | | | | | | | | | | | | | | | | | start_number option industrial cameras usually mark the trigger frame as frame number 0 all frames saved before trigger frame receive a negative sequence number Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/network: Check for av_malloc* failures in ff_tls_init()Michael Niedermayer2015-02-031-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Fix number suffixes in tb_unreliable()Michael Niedermayer2015-02-011-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: remove unneeded #include, there are no assert() only av_assert*Paul B Mahol2015-01-311-2/+0
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '4227e4fe7443733fb906f6fb6c265105e8269c74'Michael Niedermayer2015-01-271-0/+37
|\| | | | | | | | | | | | | | | | | | | | | * commit '4227e4fe7443733fb906f6fb6c265105e8269c74': lavf: add a convenience function for adding side data to a stream Conflicts: libavformat/internal.h libavformat/replaygain.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: add a convenience function for adding side data to a streamAnton Khirnov2015-01-271-0/+37
| |
| * libavformat: Check for malloc failures in avformat_new_streamMartin Storsjö2015-01-041-0/+5
| | | | | | | | | | CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
| * avformat: Make avformat_free_context handle NULLLuca Barbato2014-10-171-0/+3
| | | | | | | | | | | | | | Work as the other free()-like functions. Bug-Id: CID 1087081 CC: libav-stable@libav.org
* | avformat: Improve data streams/codec supportAnshul Maheshwari2015-01-161-0/+1
| | | | | | | | | | | | | | This adds data codec/stream handling where previously there was only audio/video/subtitles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Use avio_closep() to avoid leaving stale pointers in memoryMichael Niedermayer2015-01-091-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a ↵Michael Niedermayer2015-01-061-0/+1
| | | | | | | | | | | | stale pointer in memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: add dvbsub to set_codec_from_probe_data()Michael Niedermayer2015-01-051-0/+1
| | | | | | | | | | | | Fixes part of ticket 4221 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add FFMPEG_VERSION into the binary libsMichael Niedermayer2014-12-191-0/+3
| | | | | | | | | | | | This simplifies identifying from which revision a binary of a lib came from Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Do not update programs streams from program-less streams in ↵Michael Niedermayer2014-12-141-0/+2
| | | | | | | | | | | | | | | | update_wrap_reference() Fixes Ticket3686 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: use r_frame_rate only in the demuxer for ↵Michael Niedermayer2014-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | ff_compute_frame_duration() This is primarly to maintain current behavior when r_frame_rate is set for muxers and could be reverted if it has some advantage Fixes Ticket3629 part1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | fix "than" typoMichael Niedermayer2014-12-131-1/+1
| | | | | | | | | | Found-by reimar Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Do not estimate the container bitrate from the streams if ↵Michael Niedermayer2014-12-131-0/+5
| | | | | | | | | | | | one video stream lacks the bitrate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: check for malloc failurewm42014-12-121-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: change assert to av_assert0()Michael Niedermayer2014-12-091-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: replace impossible condition by av_assert0() in ff_gen_search()Michael Niedermayer2014-12-091-4/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: fix calculating the absolute difference of timestampsMichael Niedermayer2014-12-091-1/+1
| | | | | | | | | | | | we dont use FFABS(a-b) as that could result in undefined behavior if it overflows Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Compute the current pts of mpeg1/2 I/P frames from the next ↵Michael Niedermayer2014-12-091-0/+8
| | | | | | | | | | | | frame when available Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Pass the next pts/dts to compute_pkt_fields() when availableMichael Niedermayer2014-12-091-4/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Search harder for missing stream information in flv by defaultMichael Niedermayer2014-12-011-5/+10
| | | | | | | | | | | | Fixes Ticket4133 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: replace some odd 30-60 rates by higher less odd ones in ↵Michael Niedermayer2014-11-211-3/+9
| | | | | | | | | | | | | | | | get_std_framerate() Fixes Ticket4012 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Read (display) aspect ratio from mxf files.Carl Eugen Hoyos2014-11-171-0/+5
| | | | | | | | Fixes ticket #4107.
* | lavf/ffm: store/restore private codec contextLukasz Marek2014-11-161-0/+2
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | avformat/utils: Leave skip_clear enabled until after estimate_timings()Michael Niedermayer2014-11-031-1/+2
| | | | | | | | | | | | Should make no difference but will be needed for subsequent commits Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: support more AVC Intra formats without SPS/PPS headerThomas Mundt2014-10-291-2/+40
| | | | | | | | | | | | | | add support for AVC Intra 50 720p and 1080p without SPS/PPS header in mxf and mov demuxers. I got the SPS/PPS tables from libbmx. Reviewed-by: tomas.hardin@codemill.se Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: Add and use ff_copy_whitelists()Michael Niedermayer2014-10-241-0/+13
| | | | | | | | | | | | | | Fixes potential security issue in case of running out of memory Found-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: Add format_whitelistMichael Niedermayer2014-10-191-0/+17
| | | | | | | | | | | | | | | | This allows restricting demuxers to a list of needed ones for improved security Note, some demuxers themselfs open other demuxers, these are only restricted if AVOptions are forwarded to them. Please check that your code does that. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/util: Simplify av_guess_frame_rate() by using AVCodecContext.framerateMichael Niedermayer2014-10-161-2/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: Try to correct the codec_framerate in ↵Michael Niedermayer2014-10-161-1/+1
| | | | | | | | | | | | | | | | ff_compute_frame_duration() for the encoding case No testcase where this makes a difference is known Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: use av_reduce() to simplify code and avoid overflow in ↵Michael Niedermayer2014-10-151-8/+9
| | | | | | | | | | | | ff_compute_frame_duration() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2d6e58497e76836604364b037df9b00ba3d75b69'Michael Niedermayer2014-10-151-6/+12
|\| | | | | | | | | | | | | | | | | | | * commit '2d6e58497e76836604364b037df9b00ba3d75b69': lavf: switch to AVCodecContext.framerate for demuxing Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: switch to AVCodecContext.framerate for demuxingAnton Khirnov2014-10-151-6/+8
| |
| * lavf: Don't drop both pts and dts if timestamps are invalidMichael Niedermayer2014-10-121-1/+1
| | | | | | | | | | | | | | | | | | In these cases, only drop dts. Because if we drop both we have no timestamps at all for some files. This improves playback of HLS streams from GoPro cameras. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/utils: print more information with av_dlog() in compute_pkt_fields()Michael Niedermayer2014-10-131-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: remove obsolete FF_API_READ_PACKET cruftJames Almer2014-10-051-7/+0
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruftJames Almer2014-10-051-7/+0
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat: remove obsolete FF_API_SET_PTS_INFO cruftJames Almer2014-10-051-8/+0
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat: remove obsolete FF_API_NEW_STREAM cruftJames Almer2014-10-051-10/+0
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat: remove obsolete FF_API_FORMAT_PARAMETERS cruftJames Almer2014-10-051-7/+0
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '19133e96d30e3f80dbae236ef081aedef419a6bf'Michael Niedermayer2014-09-291-0/+5
|\| | | | | | | | | | | | | | | | | | | * commit '19133e96d30e3f80dbae236ef081aedef419a6bf': lavf: fix memleaks in avformat_find_stream_info() Conflicts: libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: fix memleaks in avformat_find_stream_info()Justin Ruggles2014-09-291-0/+5
| | | | | | | | | | | | | | | | When AVFMT_FLAG_NOBUFFER is set, the packets are not added to the AVFormatContext packet list, so they need to be freed when they are no longer needed. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/mp3dec: avoid early EOF with concatenated gapless mp3swm42014-09-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider a file created with something like: cat file1.mp3 file2.mp3 > result.mp3 Then if file2.mp3 has gapless information, result.mp3 would stop playing something in the middle. This happens because the gapless info directs the decoder to discard all samples after a certain position. To make matters worse, the gapless info of file2.mp3 will be used when playing the file1.mp3 part, because the gapless info is located at the end of the file. While handling concatenated gapless files correctly would be insane and a lot of effort (especially without scanning the whole file on opening), it's easy to prevent at least early EOF. Playback will happen to work, even if it's slightly broken. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: fix gapless audio supportwm42014-09-201-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | The code already had skipping of initial padding, but discarding trailing frame padding was missing. This is somewhat questionable, because it will make the decoder discard any data after the declared file size in the LAME header. But note that skipping full frames at the end of the stream is required. Encoders actually create such files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>