aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
| * avformat_find_stream_info: move duration guessing after updating codec ↵Anton Khirnov2016-03-041-2/+2
| | | | | | | | | | | | | | | | parameters This bitrate might not be known otherwise. Bug-Id: 926
* | avformat/utils: use av_codec_g/set_lowres()Michael Niedermayer2016-04-121-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-188/+427
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-91/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
| * lavf: use the io_open callbacks for files opened from open_input() as wellAnton Khirnov2016-02-221-2/+2
| | | | | | | | There is no real reason to treat them differently.
* | lavc/utils: Introduce ff_bprint_to_codecpar_extradata for avformatHendrik Leppkes2016-04-031-0/+23
| | | | | | | | | | | | | | | | It will be used by text subtitle demuxers to construct format instructions straight into extradata. They all currently a similar function that accepts an AVCodecContext instead. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | fix some a/an typosLou Logan2016-03-281-1/+1
| | | | | | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* | avformat/utils: scan a bit farther for a keyframe in mpeg/mpegts (7 sec ↵Michael Niedermayer2016-03-211-0/+2
| | | | | | | | | | | | | | | | instead of 5, we already scan 90sec in some cases by default) Fixes Ticket5305 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/utils: increase detected start_time with skip_samplesMarton Balint2016-03-201-2/+8
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/utils: Do not wait for more than 1 frame on attachmentsMichael Niedermayer2016-03-191-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/utils: Fix DTS for short H264 streams.Sasi Inguva2016-03-121-0/+13
| | | | | | | | | | | | | | 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>