Michael Niedermayer
19321a295a
avformat/utils: Terminate SPS in avci100_1080i_extradata to avoid warnings during parsing
...
Fixes: AVCI100_Test.mxf
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
wm4
cca44764b9
avformat: add avformat_flush()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
wm4
9deaec7828
lavf: move internal fields from public to internal context
...
This is not an API change; the fields were explicitly declared private
before.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Michael Niedermayer
e8f814a907
avformat/utils: Fix division by 0
...
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>
10 years ago
Stefano Sabatini
fd242b468d
lavf/utils: fix if_( style
10 years ago
Michael Niedermayer
e005dc621a
avformat: fix mode of img2dec.c and utils.c
...
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Liviu Oniciuc
b37858eae1
avformat/img2dec: remove the non-negative number requirement for 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>
10 years ago
Michael Niedermayer
7620d48f2e
avformat/network: Check for av_malloc* failures in ff_tls_init()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4b15bba2ae
avformat/utils: Fix number suffixes in tb_unreliable()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Paul B Mahol
43630c82f1
avformat/utils: remove unneeded #include, there are no assert() only av_assert*
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Anton Khirnov
4227e4fe74
lavf: add a convenience function for adding side data to a stream
10 years ago
Anshul Maheshwari
a47c9331ef
avformat: Improve data streams/codec support
...
This adds data codec/stream handling where previously there was only
audio/video/subtitles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2959a61232
avformat/utils: Use avio_closep() to avoid leaving stale pointers in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
bbfca8e84b
avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ce1e10aa24
avformat/utils: add dvbsub to set_codec_from_probe_data()
...
Fixes part of ticket 4221
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
9f810a9b37
libavformat: Check for malloc failures in avformat_new_stream
...
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
649c158e8c
Add FFMPEG_VERSION into the binary libs
...
This simplifies identifying from which revision a binary of a lib came from
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a29524bf2e
avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference()
...
Fixes Ticket3686
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
add46edf33
avformat/utils: use r_frame_rate only in the demuxer for 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>
10 years ago
Michael Niedermayer
d5a263f480
fix "than" typo
...
Found-by reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
53496aa7f3
avformat/utils: Do not estimate the container bitrate from the streams if one video stream lacks the bitrate
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
wm4
a66893ac94
avformat/utils: check for malloc failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
20cb3fab3f
avformat/utils: change assert to av_assert0()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
041c6109da
avformat/utils: replace impossible condition by av_assert0() in ff_gen_search()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a5e5959d52
avformat/utils: fix calculating the absolute difference of timestamps
...
we dont use FFABS(a-b) as that could result in undefined behavior if it overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
dd70470d72
avformat/utils: Compute the current pts of mpeg1/2 I/P frames from the next frame when available
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9e561410c0
avformat/utils: Pass the next pts/dts to compute_pkt_fields() when available
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
24fdf7334d
avformat/utils: Search harder for missing stream information in flv by default
...
Fixes Ticket4133
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
367c9d33d6
avformat: replace some odd 30-60 rates by higher less odd ones in get_std_framerate()
...
Fixes Ticket4012
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
92c07acce7
Read (display) aspect ratio from mxf files.
...
Fixes ticket #4107 .
10 years ago
Lukasz Marek
6690d4c3f5
lavf/ffm: store/restore private codec context
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Michael Niedermayer
a7f25979dd
avformat/utils: Leave skip_clear enabled until after estimate_timings()
...
Should make no difference but will be needed for subsequent commits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Thomas Mundt
1700fa013e
avformat/utils: support more AVC Intra formats without SPS/PPS header
...
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>
10 years ago
Michael Niedermayer
4641ae352e
avformat: Add and use ff_copy_whitelists()
...
Fixes potential security issue in case of running out of memory
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
057ea2a982
avformat: Add format_whitelist
...
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>
10 years ago
Luca Barbato
0db6bbb24c
avformat: Make avformat_free_context handle NULL
...
Work as the other free()-like functions.
Bug-Id: CID 1087081
CC: libav-stable@libav.org
10 years ago
Michael Niedermayer
d267a0f8c1
avformat/util: Simplify av_guess_frame_rate() by using AVCodecContext.framerate
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
004f1c6cf1
avformat/utils: Try to correct the codec_framerate in 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>
10 years ago
Michael Niedermayer
a92192d2e4
avformat/utils: use av_reduce() to simplify code and avoid overflow in ff_compute_frame_duration()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
2d6e58497e
lavf: switch to AVCodecContext.framerate for demuxing
10 years ago
Michael Niedermayer
40f2b16d52
avformat/utils: print more information with av_dlog() in compute_pkt_fields()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
bd239c9a2e
lavf: Don't drop both pts and dts if timestamps are invalid
...
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>
10 years ago
James Almer
ddc3768161
avformat: remove obsolete FF_API_READ_PACKET cruft
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
ecf457f3ac
avformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
3bd9f17b8a
avformat: remove obsolete FF_API_SET_PTS_INFO cruft
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
a578b93c73
avformat: remove obsolete FF_API_NEW_STREAM cruft
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
cc787709ee
avformat: remove obsolete FF_API_FORMAT_PARAMETERS cruft
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Justin Ruggles
19133e96d3
lavf: fix memleaks in avformat_find_stream_info()
...
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>
10 years ago
wm4
6c7f1155bb
avformat/mp3dec: avoid early EOF with concatenated gapless mp3s
...
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>
10 years ago
wm4
d87fe2687f
avformat/mp3dec: fix gapless audio support
...
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>
10 years ago