aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | avformat/utils: Update codec_id before using it in the parser initMichael Niedermayer2016-10-101-10/+11
| | | | | | | | | | | | | | | | | | Fixes assertion failure Fixes: input.avi Found-by: 连一汉 <lianyihan@360.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/utils: avoid using programs for duration when there's only oneRodger Combs2016-10-061-1/+1
| | | | | | | | | | This allows us to be more selective about the streams we derive durations from (specifically, ignoring text streams with outlier end times) in the common case
* | lavf/utils: ignore outlier subtitle and data stream end times as wellRodger Combs2016-10-061-2/+12
| |
* | avformat: add av_stream_get_codec_timebase()James Almer2016-09-271-0/+12
| | | | | | | | | | | | This will allow ffmpeg.c to stop using AVStream.codec in some cases Signed-off-by: James Almer <jamrial@gmail.com>
* | lavf/utils: Avoid an overflow for huge negative durations.Carl Eugen Hoyos2016-09-241-1/+1
| | | | | | | | Fixes ticket #5135.
* | avformat/utils: avoid using marked decoders for probingTimo Rothenpieler2016-09-231-1/+18
| | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: force native h264 decoder for probingTimo Rothenpieler2016-09-221-3/+15
| | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: switch to codecparClément Bœsch2016-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is largely based on commit 15e84ed3 from Anton Khirnov <anton@khirnov.net> which was previously skipped in bbf5ef9d. There are still a bunch of things raising codecpar related warnings that need fixing, such as: - the use of codec->debug in the interactive debug mode - read_ffserver_streams(): it's probably broken now but there is no test - lowres stuff - codec copy apparently required by bitstream filters The matroska references are updated because they now properly forward the field_order (previously unknown, now progressive). Thanks to James Almer for fixing a bunch of FATE issues in this commit. Signed-off-by: Clément Bœsch <clement@stupeflix.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | lavf/utils: Support av_index_search_timestamp in case of AVIndexEntry with ↵Sasi Inguva2016-09-191-0/+10
| | | | | | | | | | | | | | discarded packets. Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: fix timebase error in avformat_seek_file()Xinzheng Zhang2016-09-141-0/+1
| | | | | | | | | | | | | | | | When there is only one stream and stream_index has not specified, The ts has been transferd by the timebase of stream0 without modifying the stream_index In this condation it cause seek failure. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/utils: add missing ismv in MOV-like formatsClément Bœsch2016-09-141-1/+1
| |
* | lavf/utils: simplify matching MOV-like formatsClément Bœsch2016-09-141-3/+1
| |
* | lavf: add avformat_transfer_internal_stream_timing_info() and use it in ffmpegClément Bœsch2016-09-141-0/+64
| | | | | | | | | | In lavf we have access to st->internal->avctx so it's a better place than in ffmpeg*.c and will allow moving to codecpar.
* | avformat: Export ticks_per_frame in st->codecMichael Niedermayer2016-09-071-1/+3
| | | | | | | | | | | | | | | | | | | | Fixes regressions with stream copy and output timebase/fps being twice as fine as needed Makes the timebase and ticks per frame handled identical which should make the code easier to understand and work with. It does not solve the problem without st->codec access Suggested-by: Hendrik Leppkes Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: fix a codecpar non useJames Almer2016-08-271-1/+1
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/utils: End probing if the expected codec surpasses ↵Michael Niedermayer2016-08-271-1/+4
| | | | | | | | | | | | | | | | AVPROBE_SCORE_STREAM_RETRY Fixes Ticket5800 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavformat/utils: added ability to probe AVMEDIA_TYPE_DATA formatErkki Seppälä2016-08-231-1/+6
| | | | | | | | | | | | | | | | | | | | Now force_codec_ids supports AVMEDIA_TYPE_DATA and avformat_query_codec accepts data codecs as well in addition to video, audio and subtitle tracks. Signed-off-by: Erkki Seppälä <erkki.seppala.ext@nokia.com> Signed-off-by: OZOPlayer <OZOPL@nokia.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: add 64-bit signed pcm codecPaul B Mahol2016-08-181-0/+2
| |
* | avformat: factorize iso 8601 timestamp writer to a dictionary avutil functionMarton Balint2016-08-171-14/+2
| | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavf: mark stream as const pointer in av_stream_get_side_data() for next bumpClément Bœsch2016-08-171-2/+7
| |
* | lavf/utils: add some const to pointers parameters in a few functionsClément Bœsch2016-08-171-3/+3
| |
* | avformat: Add av_get_frame_filename2() and AV_FRAME_FILENAME_FLAGS_MULTIPLEMichael Niedermayer2016-08-041-2/+7
| | | | | | | | | | | | | | This will be used to allow writing file sequences using the tee output onto multiple places in parallel Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Fix find_stream_info not considering the extradata it foundAnssi Hannula2016-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9200514ad8717c6 ("lavf: replace AVStream.codec with AVStream.codecpar") merged in commit 6f69f7a8bf6a0d01 changed avformat_find_stream_info() to put the extradata it got from st->parser->parser->split() to st->internal->avctx instead of st->codec (extradata in st->internal->avctx will be later copied to st->codecpar). However, in the same function, the "is stream ready?" check was changed to check for extradata in st->codecpar instead of st->codec, even though st->codecpar is not yet updated at that point. Extradata retrieved from split() is therefore not considered anymore, and avformat_find_stream_info() will therefore needlessly continue probing in some cases. Fix that by checking for the extradata at st->internal->avctx where it is actually put.
* | avformat/utils: Add ff_format_output_open() functionJan Sebechlebsky2016-07-161-0/+10
| | | | | | | | | | | | | | | | Add ff_format_output_open utility function to wrap io_open callback of AVFormatContext structure. Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/utils: Add ff_stream_encode_params_copy()Jan Sebechlebsky2016-07-161-0/+57
| | | | | | | | | | Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/utils: update deprecated AVStream->codec when the context is updatedHendrik Leppkes2016-06-301-0/+9
| | | | | | | | | | | | | | | | | | This ensures the AVStream->codec entry is kept in sync when new streams are discovered mid-playback or changes to the context occur from other sources. Fixes trac 5678. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf: update auto-bsf to new BSF APIRodger Combs2016-06-251-10/+49
| |
* | lavf: deprecate av_apply_bitstream_filtersRodger Combs2016-06-251-0/+4
| |
* | lavf/utils: fix const warning at a find_decoder() callClément Bœsch2016-06-251-1/+1
| |
* | avformat/utils: Use internal->avctx for bitrate in ↵Michael Niedermayer2016-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | estimate_timings_from_bit_rate() if needed The internal avctx bitrate is copied into codecpar after estimate_timings() Fixes Ticket5646 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: change bit_rate to 64 bit in estimate_timings_from_bit_rate()Michael Niedermayer2016-06-221-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: in debug mode, print number of streams found before ↵Aman Gupta2016-06-141-2/+2
| | | | | | | | | | | | avformat_find_stream_info() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/utils: fix timestamp trace log in estimate_timings() functionStefano Sabatini2016-06-141-4/+4
| | | | | | | | | | Use the correct timebase, also replace "stream" with "format" in the context of the format.
* | avformat/utils: Export coded dimensions unconditionallyMichael Niedermayer2016-06-131-2/+2
| | | | | | | | | | | | | | This fixes a API regression Probably fixes Ticket5451 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Do not overwrite, but use sample_fmt from contextMichael Niedermayer2016-06-091-0/+3
| | | | | | | | | | | | Fixes Ticket 3759 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Open decoder even if there are no packets if parameters are ↵Michael Niedermayer2016-06-091-2/+11
| | | | | | | | | | | | missing Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Initialize st in loopMichael Niedermayer2016-06-091-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: Copy properties from internal contextMichael Niedermayer2016-06-021-0/+3
| | | | | | | | | | | | | | Fixes Ticket5467 "Lossless j2k information no longer shown" Based on suggestion by Hendrik Leppkes Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: avoid overflow in compute_chapters_end() with huge durationsMichael Niedermayer2016-05-291-1/+1
| | | | | | | | | | | | | | Fixes: usan_granule_overflow Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: avoid overflow in update_stream_timings() with huge durationsMichael Niedermayer2016-05-291-1/+1
| | | | | | | | | | | | | | Fixes: usan_granule_overflow Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Fix use of uninitialized variableMichael Niedermayer2016-05-261-2/+1
| | | | | | | | | | | | Fixes CID1361961 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Check negative bps before shifting in ff_get_pcm_codec_id()Chris Cunningham2016-05-171-1/+1
| | | | | | | | | | | | Fixes: undefined shift. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Do not compute the bitrate from duration == 0Michael Niedermayer2016-05-161-1/+1
| | | | | | | | | | | | Fixes division by 0 in fate-acodec-ra144 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Check bps before using it in a shift in ff_get_pcm_codec_id()Michael Niedermayer2016-05-111-0/+3
| | | | | | | | | | | | | | | | Fixes undefined shift Fixes: usan_shift Found-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: Do not detect video codecs when audio is expectedMichael Niedermayer2016-05-041-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf: use new decode APIwm42016-04-211-15/+15
| | | | | | | | | | | | | | From Libav commit 8bc4accc37ab047d2fd85d672c577b39dfc918e1, with additional code for decoding subtitles (not present in Libav). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/utils: Remove use of caps_internal as it is not public APIMichael Niedermayer2016-04-211-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol2016-04-141-2/+2
| | | | | | | | | | | | Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Revert "Merge commit '1ceb07eb313c2d51383408025e57a2fe50ccd164'"Derek Buitenhuis2016-04-131-3/+3
| | | | | | | | | | | | | | | | | | Broke a lot of stuff and didn't fix anything. This reverts commit 3c461eecd48ba2cf7616d98e6f99954de3ad4b06, reversing changes made to 884dd175f061c03d7ba4896685e81bf8adc3ea94. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '1ceb07eb313c2d51383408025e57a2fe50ccd164'Derek Buitenhuis2016-04-131-3/+3
|\| | | | | | | | | | | | | * commit '1ceb07eb313c2d51383408025e57a2fe50ccd164': avformat_find_stream_info: move duration guessing after updating codec parameters Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>