Michael Niedermayer
5312c319be
avformat_find_stream_info: fallback to timestamps in analyzeduration check in more cases
...
This fixes speex in rtmp
Fixes Ticket2409
the nellymoser in flv case actually needs larger analyzeduration. The code
previously just failed to calculate the duration
If this causes any problems, like premature analyze/probe end, please report!
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c7cfd4cce9
avformat_find_stream_info: use fps_dts as last resort to determine duration
...
Fixes long delay with some hardware generated h264 in ts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8ca5d277d8
avformat/utils: factor ff_find_last_ts() out of ff_gen_search()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d59ec0adbb
avformat_find_stream_info: move ret init down from flush codecs.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c5ddd75354
avformat_find_stream_info: Do not consider no streams an error in flush codecs
...
This should have no functional effect, but allows a cleaner diff when moving it
down
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c826c5698b
avformat_find_stream_info: try to preserve the error code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ccba9535dc
av_find_stream_info: initialize ret
...
This should fix hypothetical corner cases where it might have never been initialized before use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
2492f7774f
avformat: Print "Consider increasing the value for analzeduration and probesize" even more often
...
The sample from ticket #2691 currently does not trigger "Consider increasing
the value for analzeduration and probesize" because the audio streams are
only added after calling estimate_timings(). Attached patch moves the message
below this function call.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Timothy Gu
a9bbf59be7
cosmetics: Fix "dont" "wont" "doesnt" typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
wm4
e59fb3f8b1
lavf: silence max_analyze_duration warning
...
This is part of normal operation with some formats. A warning should
indicate that something is wrong, and the documentation for AV_LOG_WARNING
says: "Something somehow does not look correct."
Since this message is most likely useful for debugging only, raise the
log level accordingly.
Plus-one-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f8ca8138f0
ff_gen_search: fix infinite loop
...
Fixes Ticket2639
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b3dd50cd0d
ff_gen_search: fix limit
...
The limit value could become slightly wrong in the last iteration
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9d73e30253
ff_gen_search: make step 64it to prevent hypothetical integer overflow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
e997afdfc6
lavf: show APIC for tta files too
...
Fixes #2676 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Luca Barbato
df9f22d42b
avf: move url utility functions in a separate file
12 years ago
Luca Barbato
12db891dcd
avf: move ff_write_chained to mux.c
12 years ago
Luca Barbato
508998f7d5
avf: move riff tags accessors where they belong
12 years ago
Luca Barbato
ec7c51c786
avf: move ff_http_match_no_proxy to network
...
It is only used by network protocols.
12 years ago
Luca Barbato
afc8685395
avf: split off format register and lookup function
12 years ago
Paul B Mahol
d5f7f1fef1
audio frame multi-threaded decoding
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
c330eba84c
lavf: preserve side data when parsing packets.
12 years ago
Dale Curtis
c54a1565f5
avformat/utils: Keep internal and external av_read_frame() packets in sync.
...
Otherwise, during error conditions, the caller will be left with
dangling pointers to a destructed packet => boom.
BUG=242786
TEST=ffmpeg_regression_tests
Commit slightly simplified by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
2832ea26f3
Remove commented-out debug #define cruft
12 years ago
Diego Biurrun
e0f8be6413
avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate
12 years ago
Nicolas George
3fc66dfef2
lavf: filter out AVSEEK_FLAG_BACKWARD in new API.
...
Also document that it has no effect.
12 years ago
Nicolas George
cc24afb45c
lavf: call the new seek API from the old.
...
If the demuxer implements read_seek2() and not read_seek(),
call avformat_seek_file() from av_seek_frame().
Allow to properly seek in formats that only implement the
new API from applications that use the old one.
Tested with mplayer and a concat script.
12 years ago
Diego Biurrun
a5f8873620
silly typo fixes
12 years ago
Paul B Mahol
ad56535dd1
avformat: fix orig_pos type to match pkt->pos
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
833bc6678f
avformat: change seeking index consistency asserts to av_asserts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
020c287f5e
avformat: Dont stop probing before the whole id3 tag is read
...
When a file appears to start with a id3 tag and appears to
also be something else, then try to increase the probe buffer
size if its below its limit.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
dbb1425811
lavf: make sure stream probe data gets freed.
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Michael Niedermayer
e10f5bd05c
avformat: Add a mechanism to allow demuxers to detect byte based seeking.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ccc25378bd
avformat: fix atomatic format selection for (s)segment
...
Fixes Ticket2236
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
4d3c5d3b65
Do not show "Estimating duration from bitrate" warning if no duration was estimated.
12 years ago
Michael Niedermayer
ef7b6b489a
ffmpeg/avformat: factor av_guess_frame_rate() out
...
This will be used in ffplay
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ea9a6709a9
estimate_timings_from_bit_rate: Check timebase and bitrate
...
Fixes integer overflow and assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
460d30406b
avformat: change some seeking related assert to av_asserts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
710cd0fddf
avformat: Fix infinite probing that reads the whole file
...
Fixes: otonajoshi_avformat_tries_to_load_whole.ts
Reported-by: JEEB (on IRC)
Thanks-to: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
06a43baecd
av_find_stream_info: change read_size to 64bit
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
0d09aa9d8e
lavf: avformat_seek_file(): validate stream_index.
12 years ago
Michael Niedermayer
73ef12757b
append_packet_chunked: remove outcommented code
...
our variant works fine and should be better
also remove related unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
07d4f557e5
append_packet_chunked: Remove unused initialization.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
aa3c779984
lavf: sanity check size in av_get/append_packet().
...
To avoid allocating ridiculous amounts of memory for corrupted files,
read the input in chunks limited to filesize or an arbitrary large
amount when that is not known (chosen to be 50M).
12 years ago
Michael Niedermayer
c292e340ed
avformat: keep r_frame_rate
...
This field is used and nothing equivalent exists
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
85a5bc054c
lavf: remove disabled FF_API_R_FRAME_RATE cruft
12 years ago
Anton Khirnov
7b486ab13b
lavf: remove disabled FF_API_AV_GETTIME cruft
12 years ago
Anton Khirnov
435c2a31ad
lavf: remove disabled FF_API_READ_PACKET cruft
12 years ago
Anton Khirnov
0a7c4daf46
lavf: remove disabled FF_API_CLOSE_INPUT_FILE cruft
12 years ago
Anton Khirnov
1afddbe59e
avpacket: use AVBuffer to allow refcounting the packets.
...
This will allow us to avoid copying the packets in many cases.
This breaks ABI.
12 years ago
Reimar Döffinger
efa7f42020
Use the avstring.h locale-independent character type functions
...
Make sure the behavior does not change with the locale.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago