mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01:00
demux_lavf: print how many bytes are read by avformat_find_stream_info()
Can be helpful for debugging slow stream startup. Also add a comment about BIO_BUFFER_SIZE.
This commit is contained in:
parent
137c1032fa
commit
3face4300e
@ -61,6 +61,8 @@ const m_option_t lavfdopts_conf[] = {
|
||||
{NULL, NULL, 0, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
// Should correspond to IO_BUFFER_SIZE in libavformat/aviobuf.c (not public)
|
||||
// libavformat (almost) always reads data in blocks of this size.
|
||||
#define BIO_BUFFER_SIZE 32768
|
||||
|
||||
typedef struct lavf_priv {
|
||||
@ -524,6 +526,10 @@ static demuxer_t *demux_open_lavf(demuxer_t *demuxer)
|
||||
"LAVF_header: av_find_stream_info() failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mp_msg(MSGT_HEADER, MSGL_V, "demux_lavf: avformat_find_stream_info() "
|
||||
"finished after %"PRId64" bytes.\n", stream_tell(demuxer->stream));
|
||||
|
||||
/* Add metadata. */
|
||||
while ((t = av_dict_get(avfc->metadata, "", t,
|
||||
AV_DICT_IGNORE_SUFFIX)))
|
||||
|
Loading…
Reference in New Issue
Block a user