Commit Graph

1657 Commits

Author SHA1 Message Date
Michael Niedermayer
4afc3429be avformat/utils: Fix regression with H264 stream probing
Fixes Ticket4725

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 03:37:43 +02:00
Michael Niedermayer
cdca400c5e avformat/utils: Print stream number in max_analyze_duration exit path
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-16 03:30:24 +02:00
Michael Niedermayer
90dd6ad22c avformat/utils: inform the user if the protocol cannot be determined
Assuming the wrong protocol can lead to suboptimal seeking performance

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 04:09:09 +02:00
Michael Niedermayer
901922e047 avformat/utils: adjust short skip threshold in ff_configure_buffers_for_index() to avoid seeking if a packet is skiped
Fixes Ticket4126

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-15 03:35:08 +02:00
wm4
130a8e0eef avformat: don't crash API users when demuxing mp4
This code is one big chunk of WTF.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 22:41:35 +02:00
Michael Niedermayer
b513661251 avformat/utils: Skip ff_configure_buffers_for_index() for local files
Theres no known case where its use on local files improves performance
if you know of such a case, please contact us

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 14:27:02 +02:00
Michael Niedermayer
b183fb4767 avformat: Add ff_configure_buffers_for_index()
This allows configuring the io buffer in such way that few seeks are needed for playback

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-13 12:38:21 +02:00
Michael Niedermayer
838c5f3df7 avformat/utils: Redesign scoring in av_find_default_stream_index()
This avoids empty streams from being selected if a equivalent non empty one is available
The new system is also clearer and more systematic
This may need finetuning, which should be easy to do ...

Fixes Ticket2687

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-01 22:51:48 +02:00
Michael Niedermayer
42c41e96ff avformat/utils: Do not select audio streams with unknown sample rate in av_find_best_stream()
Together with the next commit this prevents non-PCM S302M from being selected unless either
it can be decoded or the user selects passthrough/copy

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 01:02:43 +02:00
Michael Niedermayer
1e0c34fe71 avformat/utils: Simplify get_std_framerate() check
This also avoids using a floating point operation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 04:31:37 +02:00
Carl Eugen Hoyos
57eecd9e4f lavf: Use av_codec_get_tag2() in avformat_query_codec().
av_codec_get_tag() can return 0 both in case of error and success.
2015-05-28 12:31:40 +02:00
Michael Niedermayer
541d75f9a0 avformat: add callback for opening further files
Previous version reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-11 21:55:18 +02:00
Vittorio Giovara
32da94fa7f lavf: Reset global flag on deinit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-23 13:55:55 +02:00
wm4
7dd8bf53bd avformat: add common mechanism for skipping samples at the start of file
This makes using the generic indexing code with mp3 easier at a later
point.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-22 14:05:46 +02:00
Michael Niedermayer
ba631b7914 avformat/utils: Ensure that AVFMT_FLAG_CUSTOM_IO is set before use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-21 00:58:11 +02:00
Michael Niedermayer
5380c9afb9 Merge commit '98cab39798612dcaea4f9b6d1e7974bc60d84e13'
* commit '98cab39798612dcaea4f9b6d1e7974bc60d84e13':
  lavf: Fix variables constness in ff_iso8601_to_unix_time()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 23:00:08 +02:00
Vittorio Giovara
98cab39798 lavf: Fix variables constness in ff_iso8601_to_unix_time()
warning: assigning to
      'char *' from 'const char *' discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
2015-04-20 18:43:33 +01:00
Michael Niedermayer
84b95715fa avformat/utils: Place timestamp trace logs under FF_FDEBUG_TS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 17:03:27 +02:00
Michael Niedermayer
d02b3e9bdb avformat/utils: Provide context for av_log() where one is available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 16:24:47 +02:00
Michael Niedermayer
40d552dae6 Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'
* commit '1a3eb042c704dea190c644def5b32c9cee8832b8':
  Replace av_dlog with normal av_log at trace level

Conflicts:
	ffplay.c
	libavdevice/fbdev_dec.c
	libavfilter/avfilter.c
	libavfilter/internal.h
	libavfilter/setpts.c
	libavfilter/src_movie.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fieldorder.c
	libavformat/assdec.c
	libavformat/avidec.c
	libavformat/flvdec.c
	libavformat/http.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/mov.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/mpegtsenc.c
	libavformat/mux.c
	libavformat/mxfdec.c
	libavformat/nsvdec.c
	libavformat/oggdec.c
	libavformat/r3d.c
	libavformat/rtspdec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 03:19:47 +02:00
Vittorio Giovara
1a3eb042c7 Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Michael Niedermayer
edbb9b5e8f avformat/utils: Add HEVC to unreliable_tb()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-18 02:20:50 +02:00
Michael Niedermayer
80fa48a413 avformat/utils: Use codec_info_duration_fields in fps calculation end decission when no timestamps and thus no duration_count is available
This avoids waiting for a count to increase which will always be 0 and may
reduce the startup delay for affected streams (rare)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-18 02:18:55 +02:00
Michael Niedermayer
b50a4ca179 avformat/utils: Preserve packet duration when parsing is done only for headers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 04:31:30 +02:00
wm4
2b5f34f788 avformat, avcodec: log discard padding
Useful for debugging.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 21:37:46 +02:00
Michael Niedermayer
9c37c81246 Merge commit '27f274628234c1f934b9a6a6380ed567c1b4ceae'
* commit '27f274628234c1f934b9a6a6380ed567c1b4ceae':
  parseutils: Make av_small_strptime public

Conflicts:
	doc/APIchanges
	libavformat/utils.c
	libavutil/parseutils.c
	libavutil/version.h

See: 29e972f67c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-07 20:46:25 +02:00
Luca Barbato
27f2746282 parseutils: Make av_small_strptime public
And use it in libavformat.

Based on a similar patch by Stefano Sabatini <stefasab@gmail.com>.
2015-04-07 12:36:11 +02:00
Michael Niedermayer
ff6841c6bb avformat/utils: avoid discarded streams in av_find_default_stream_index()
Fixes Ticket2010

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-06 04:31:29 +02:00
Michael Niedermayer
19321a295a avformat/utils: Terminate SPS in avci100_1080i_extradata to avoid warnings during parsing
Fixes: AVCI100_Test.mxf
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-24 18:20:40 +01:00
Michael Niedermayer
50255b7a86 Merge commit '342fc46c69199b076b7c210f42208ce39a2bde1c'
* commit '342fc46c69199b076b7c210f42208ce39a2bde1c':
  cmdutils: Add a stream specifier to map usable streams

Conflicts:
	cmdutils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-20 20:15:40 +01:00
wm4
cca44764b9 avformat: add avformat_flush()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 00:09:26 +01:00
Michael Niedermayer
2924514721 Merge commit '9deaec782810d098bca11c9332fab2d2f4c5fb78'
* commit '9deaec782810d098bca11c9332fab2d2f4c5fb78':
  lavf: move internal fields from public to internal context

Conflicts:
	libavformat/avformat.h
	libavformat/internal.h
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-11 02:47:54 +01:00
wm4
9deaec7828 lavf: move internal fields from public to internal context
This is not an API change; the fields were explicitly declared private
before.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-10 21:45:04 +01:00
Michael Niedermayer
e8f814a907 avformat/utils: Fix division by 0
Fixes: signal_sigsegv_14999ef_1188_cov_2888512890_SVA_CL1_E.264

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-09 21:15:27 +01:00
Stefano Sabatini
fd242b468d lavf/utils: fix if_( style 2015-02-04 13:17:30 +01:00
Michael Niedermayer
e005dc621a avformat: fix mode of img2dec.c and utils.c
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-03 22:27:23 +01:00
Liviu Oniciuc
b37858eae1 avformat/img2dec: remove the non-negative number requirement for start_number option
industrial cameras usually mark the trigger frame as frame number 0
all frames saved before trigger frame receive a negative sequence number

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-03 18:57:23 +01:00
Michael Niedermayer
7620d48f2e avformat/network: Check for av_malloc* failures in ff_tls_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-03 02:21:55 +01:00
Michael Niedermayer
4b15bba2ae avformat/utils: Fix number suffixes in tb_unreliable()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-01 19:19:25 +01:00
Paul B Mahol
43630c82f1 avformat/utils: remove unneeded #include, there are no assert() only av_assert*
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-01-31 08:57:06 +00:00
Michael Niedermayer
0bdcc27d95 Merge commit '4227e4fe7443733fb906f6fb6c265105e8269c74'
* commit '4227e4fe7443733fb906f6fb6c265105e8269c74':
  lavf: add a convenience function for adding side data to a stream

Conflicts:
	libavformat/internal.h
	libavformat/replaygain.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-27 18:16:42 +01:00
Anton Khirnov
4227e4fe74 lavf: add a convenience function for adding side data to a stream 2015-01-27 09:18:32 +01:00
Anshul Maheshwari
a47c9331ef avformat: Improve data streams/codec support
This adds data codec/stream handling where previously there was only
audio/video/subtitles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-16 02:24:08 +01:00
Michael Niedermayer
2959a61232 avformat/utils: Use avio_closep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 13:39:06 +01:00
Michael Niedermayer
bbfca8e84b avformat/utils: Clear pointer in ff_alloc_extradata() to avoid leaving a stale pointer in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-06 15:07:50 +01:00
Michael Niedermayer
ce1e10aa24 avformat/utils: add dvbsub to set_codec_from_probe_data()
Fixes part of ticket 4221

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-05 01:45:49 +01:00
Martin Storsjö
9f810a9b37 libavformat: Check for malloc failures in avformat_new_stream
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-04 20:04:36 +02:00
Michael Niedermayer
649c158e8c Add FFMPEG_VERSION into the binary libs
This simplifies identifying from which revision a binary of a lib came from

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 19:32:40 +01:00
Michael Niedermayer
a29524bf2e avformat/utils: Do not update programs streams from program-less streams in update_wrap_reference()
Fixes Ticket3686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 20:56:59 +01:00
Michael Niedermayer
add46edf33 avformat/utils: use r_frame_rate only in the demuxer for ff_compute_frame_duration()
This is primarly to maintain current behavior when r_frame_rate is set for muxers
and could be reverted if it has some advantage

Fixes Ticket3629 part1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 02:12:49 +01:00