Lou Logan
06eef96b69
fix some a/an typos
Signed-off-by: Lou Logan <lou@lrcd.com>
9 years ago
Michael Niedermayer
6e65b9bb1f
avformat/utils: scan a bit farther for a keyframe in mpeg/mpegts (7 sec instead of 5, we already scan 90sec in some cases by default)
Fixes Ticket5305
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Marton Balint
25f707694c
avformat/utils: increase detected start_time with skip_samples
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Michael Niedermayer
0ffa9e6eba
avformat/utils: Do not wait for more than 1 frame on attachments
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Sasi Inguva
895dd09671
lavf/utils: Fix DTS for short H264 streams.
Fill DTS if all packets have been read in avformat_find_stream_info, and still
has_decode_delay_been_guessed returns false.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Sasi Inguva
e939dde48d
avformat/utils: factor update_dts_from_pts() out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ronald S. Bultje
6d8ab358a3
lavf: allow BSFs to drop packets.
If pkt->size == 0 && pkt->side_data_elems == 0 after bsf->filter()
returns, the packet is considered dropped.
9 years ago
Michael Niedermayer
de1de49324
avformat/utils: fix dts from pts code in compute_pkt_fields() during ascending delay
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Derek Buitenhuis
93629735d7
avformat: Add a protocol blacklisting API
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Mats Peterson
ba40b3520d
lavf/utils: Normalize AVPacket.data to native endian in ff_get_packet_palette()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Marton Balint
e7dd97b5d8
avformat/utils: add a function to standardize creation time
This can be used for formats which write all format metadata as string to
files, therefore non-standard creation times such as 'now' will be parsed.
The standardized creation time is UTC ISO 8601 with microsecond precision.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Mats Peterson
2be0366a7f
lavf/utils: Add ff_get_packet_palette()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
77524ee2dc
avformat/utils: Be slightly more tolerant with fps vs. stream timebase
Fixes regression with ticket2451
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Rodger Combs
a21a3c25dc
probe TrueHD in MPEGTS
9 years ago
Anton Khirnov
7fbb3b5b98
lavf: use the io_open callbacks for files opened from open_input() as well
There is no real reason to treat them differently.
9 years ago
Marton Balint
51afd9f4e1
avformat/dvbtxt: add raw demuxer for dvb teletext probing
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Marton Balint
a573e6c103
avformat/utils: remove ff_iso8601_to_unix_time
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Marton Balint
e942454daf
avformat/utils: add ff_parse_creation_time_metadata
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Michael Niedermayer
1dba8371d9
avformat: add protocol_whitelist
Note to maintainers: update tools
Note to maintainers: set a default whitelist for your protocol
If that makes no sense then consider to set "none" and thus require the user to specify a white-list
for sub-protocols to be opened
Note, testing and checking for missing changes is needed
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
a7305c780b
Print the whitelists if entities are not found on them
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Anton Khirnov
9f61abc811
lavf: allow custom IO for all files
Some (de)muxers open additional files beyond the main IO context.
Currently, they call avio_open() directly, which prevents the caller
from using custom IO for such streams.
This commit adds callbacks to AVFormatContext that default to
avio_open2()/avio_close(), but can be overridden by the caller. All
muxers and demuxers using AVIO are switched to using those callbacks
instead of calling avio_open()/avio_close() directly.
(de)muxers that use the URLProtocol layer directly instead of AVIO
remain unconverted for now. This should be fixed in later commits.
9 years ago
Michael Niedermayer
2039b3e751
avformat: Add integer fps from 31 to 60 to get_std_framerate()
Fixes Ticket 5106
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Hendrik Leppkes
b966a403dd
avcodec/utils: fix AVPacket lifetime in seek_frame_generic
Fixes ticket #5117
9 years ago
Rodger Combs
822e80fde3
lavf: add internal API to append a bsf to a stream's list
9 years ago
Rodger Combs
4caa3e1c6c
lavf: add API to apply a list of bsfs to a packet
9 years ago
Michael Niedermayer
676a93f2d8
avformat: Add av_program_add_stream_index()
This will be used by the subsequent commit(s)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
cafb195604
avformat/utils: Fix "libavformat/utils.c:927:35: runtime error: signed integer overflow: -2450238577049583619 - 9223090561878065151 cannot be represented in type long long"
Fixes Mozilla bug 1229205
Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Nicolas George
3ab1e5a48c
lavf: add FFERROR_REDO to let demuxers return no packet.
9 years ago
Michael Niedermayer
ec7a3be11e
avformat/utils: Move end_time1 AV_NOPTS_VALUE Check after rescale
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d872643cfe
avformat/utils: Check AVFormatContext->duration in compute_chapters_end() before use
Fixes integer overflow
Fixes: 266ee543812e934f7b4a72923a2701d4/signal_sigabrt_7ffff6ae7cc9_7322_85218d61759d461bdf7387180e8000c9.ogg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Matthieu Bouron
72eaf72623
lavf/utils: avoid decoding a frame to get the codec parameters
Avoid decoding a frame to get the codec parameters while the codec
supports FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM. This is particulary useful
to avoid decoding twice images (once in avformat_find_stream_info and
once when the actual decode is made).
9 years ago
Timothy Gu
f2d9ae6e49
avformat/utils: Fix indentation
9 years ago
John Stebbins
7f4ec4364b
avformat: expose av_stream_new_side_data helper
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years ago
Michael Niedermayer
1ef336e912
avformat/utils: Do not init parser if probing is unfinished
Fixes assertion failure
Fixes: 136f8b8d47af7892306625e597dee655/signal_sigabrt_7ffff6ae7cc9_8941_ab11bea57c84796418f481f873dc31ba.dvr_ms
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Rainer Hochecker
2d8c2f1a28
avformat/utils: estimate_timings_from_pts - increase retry counter, fixes invalid duration for ts files with hevc codec
Fixes a mpegts file with hevc that fails estimating duration. Increasing number of
retries fixes the issue.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Hendrik Leppkes
c03ffe1712
avformat/utils: re-factor freeing AVStreams
This matches the Libav signature and simplifies merging future changes.
9 years ago
Anton Khirnov
8de1ee9f72
lavf: deprecate compute_pkt_fields2
All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.
The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.
9 years ago
Anton Khirnov
aeda1121c9
lavf: factor out freeing an AVStream
It will be needed in other functions.
10 years ago
Anton Khirnov
a0c71a5751
lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
The reasoning for setting it to zero only applies to demuxing.
9 years ago
Hendrik Leppkes
55abb94b7d
avformat: unref packet after storing it in internal packet queue
Fixes a memory leak when using genpts
9 years ago
Hendrik Leppkes
b64fe49371
avformat: always unref the packet after parsing
This fixes a memory leak when side-data is present.
9 years ago
Hendrik Leppkes
c2f861ca42
Replace remaining occurances of av_free_packet with av_packet_unref
9 years ago
Luca Barbato
d584533cf3
avformat: Rework add_to_pktbuf
Make it return an error and check its return value when it is used.
Simplify the usage by calling `av_packet_ref` internally when needed.
9 years ago
Luca Barbato
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
9 years ago
Luca Barbato
a5d4204309
avformat: Always return ref-counted AVPacket
And drop the av_dup_packet from the input_thread.
9 years ago
Rodger Combs
9825a24e5b
lavf/utils: avoid giving up probing early with long subtitle events
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
wm4
948f3c19a8
lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Hendrik Leppkes
3a8e447712
lavf/utils: remove some left-over cruft from the 32-bit size fields
9 years ago
James Almer
655b6dcb34
lavc/lavf: remove incompatible abi checks for the new 64bit fields
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Carl Eugen Hoyos
b290972b8f
lavf: Switch probesize and max_analyze_duration to 64bit.
Both are only accessible through AVOptions.
9 years ago