Anton Khirnov
25b3258656
lavf: add an AVStream field for exporting stream-global side data
11 years ago
Luca Barbato
db9d39b4b5
avformat: Report the duration analysis reached
11 years ago
Michael Niedermayer
2dcaa1b9d1
avformat/utils: detect MPEG streams with faulty DTS and discard affected DTS
...
Fixes issue2.ts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
3c096751ff
avformat/utils: compute_pkt_fields: Fix DTS for the case where has_b_frames is too large but the correct one is constant
...
Fixes issue1.m2ts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d4dfa97ae3
avformat/utils: reset pts_buffer in estimate_timings_from_pts()
...
This fixes the first few dts after find_stream_info
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f288e1b67c
avformat/utils: factorize h264/hevc checks out in compute_pkt_fields()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
f5fe6a4f79
Do not warn about missing start time for unknown streams.
11 years ago
Carl Eugen Hoyos
1f7e9be0b0
Only complain about missing frame rate for video streams.
11 years ago
Michael Niedermayer
2969fb4393
avformat/utils: av_guess_frame_rate() favor avg_frame_rate if r_frame_rate has a comparably unlikely value
...
Fixes Ticket3399
Fixes Ticket2958
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
480af3a35c
avformat/utils: skip the MPEG-2 style dts/pts code for HEVC
...
This extends the exception from H264 to H264 + HEVC
Fixes Ticket3385
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Marton Balint
6421111b52
lavf: allow av_find_best_stream to return AV_DISPOSITION_*_IMPAIRED wanted_streams
...
Previously these type of streams were not returned even if wanted stream was
set to a stream of such. Now they are only skipped if they are not wanted
streams.
Fixes ffplay -sst <stream number> out.ts where stream number is a *_IMPAIRED stream.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
33c859c142
lavf: ignore attachment streams for interleaving purposes
...
Those streams should never get any packets by definition.
11 years ago
Ståle Kristoffersen
8658390336
libavformat/utils.c: Cosmetics: Fix incorrect comma placement
11 years ago
Michael Niedermayer
1bc2fa447c
avformat: use AVPROBE_SCORE_STREAM_RETRY, instead of AVPROBE_SCORE_RETRY - 1
...
This makes the code clearer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Voyager1
9f6f4962fb
avformat/utils: dvd still frames read thru libdvdnav ended up in internal lavf buffer
...
This is the solution we've been using in XBMC for over 2 years for dvd still frames.
The problem is that the demuxer asks for probing of the codec in the mpeg stream.
This causes lavf to read the whole menu structure into internal buffers.
After which, it won't read from input stream anymore and no events triggers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ståle Kristoffersen
16097efb8c
Auto-detect hevc in mpeg-ts.
...
Fixes decoding of files without PMT/PAT.
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
11 years ago
Janne Grunau
78987a88a8
lavf: include 60 fps in guessed standard frame rates
...
Due to what looks like an off-by-one error 60 * 12 * 1001 / 12 * 1001
is not tested as standard frame rate in avformat_find_stream_info().
11 years ago
Diego Biurrun
d67cfdeb53
avformat: utils: Refactor duplicated PRINT macro
11 years ago
Lukasz Marek
102bd64168
lavd: add avdevice_dev_to_app_control_message API
...
New API allows to send messages from devices to application.
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
11 years ago
Diego Biurrun
50ecf15712
avformat: utils: K&R formatting cosmetics
...
Also adjust some comment wording / spelling and reorder header #includes.
11 years ago
James Darnley
86bee7984e
AVFormatContext: add metadata_header_padding field
...
This field is used to store the number of bytes that should be written
as padding to a metadata header of a file. For example:
- The FLAC format's METADATA_BLOCK_PADDING [1]
- The ID3v2 tag format's padding [2]
[1] http://xiph.org/flac/format.html#metadata_block_padding
[2] http://id3.org/id3v2.3.0#ID3v2_overview
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
cb36e441de
Never favour an audio stream with 0 channels in av_find_best_stream().
...
Fixes ticket #3311 .
11 years ago
Michael Niedermayer
05c78f345b
avformat/utils: av_probe_input_buffer2 decrease difference to libav
...
This removes the initialization of 2 unused fields
The change was part of c1868e7ee7
but wasnt merged as the fields could still be used
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
05886c9d4e
avformat/utils/av_probe_input_buffer2: fix buffer passed to ffio_rewind_with_probe_data()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8c3b026a0e
avformat/utils/av_probe_input_buffer2: fix offset check
...
The check could fail if avio_read() read less than requested
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6a2064820b
avformat/utils/av_probe_input_buffer2: Fix pd.buf_size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
2115a35974
lavf: make av_probe_input_buffer more robust
...
Always use the actually read size as the offset instead of making
possibly invalid assumptions.
Addresses: CVE-2012-6618
11 years ago
Anton Khirnov
8b76362836
lavf: use a fixed width type
...
It's shorter and more consistent with the rest of the code.
11 years ago
Anton Khirnov
c1868e7ee7
lavf: simplify handling of offset in av_probe_input_buuffer()
11 years ago
Anton Khirnov
3867f3718b
lavf: remove a pointless check
...
AVStream.codec is always non-NULL
11 years ago
Michael Niedermayer
863f4c3c71
avformat/utils: fix rounding error accumulation for generated dts in compute_pkt_fields()
...
This only updates the case where there is no B frame reordering delay.
Tested-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5047849584
avformat/utils: fix order of buffers in timestamp update code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4bfcedb33f
avformat: dont run update_initial_duration() twice
...
This should avoid floods of first_dts not matching debug messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ee4e805093
avformat: add ff_get_extradata()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d600b18f22
avformat/utils: limit rfps to values larger than fps
...
This avoids some nonsense values being produced by totally corrupted input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f6cd447bf1
avformat/utils: treat flv like mov with timestamp discarding
...
This prevents a regression when using an avparser with flv h264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
281a40e18f
lavf: remove an unneeded call to avcodec_get_frame_defaults().
...
avcodec_decode_*() resets the frame itself.
11 years ago
Anton Khirnov
eb891b3114
Replace all uses of avcodec_free_frame with av_frame_free().
11 years ago
Michael Niedermayer
81c1197494
avformat/utils: Check avcodec_open2() return code in av_find_stream_info()
...
Fixes CID1135750
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7f763775aa
avformat/utils: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1770da18f7
avformat/utils: reject poorly fitting rfps values earlier
...
This avoids collecting statistics for rfps values that very likely
will get rejected later.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1565a9a9e9
avformat/utils: factor rfps calculation out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
dc1b0a54f9
avformat/utils: provide more IO statistics in debug output at start and end of av_find_streaminfo()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f3008f30fb
avformat/utils: move update_wrap_reference() up
...
simplifies code
also remove extra {}
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
34b16e2d36
avformat/utils: reorder operations in update_wrap_reference()
...
prevents a integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
394b0c830a
avformat/utils: correct for timestamp wrap earlier
...
This uses dts & pts as reference instead of first_dts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d7ead9ad44
avformat/utils: also fix wrapping of start_time in update_initial_timestamps()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
dd5f925927
avformat/utils: Fix pts_wrap_behavior calculation with negative first_dts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Michael Niedermayer
f0f75dfa34
avformat/utils: inject audio skip side data before the side data merge code
...
This ensures that its handled the same way as other side data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago