diff options
author | wm4 <wm4@nowhere> | 2013-05-24 12:00:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-26 17:01:54 +0200 |
commit | 3face4300ed01d0b9394efab4dfdcf997cc48704 (patch) | |
tree | 815eb20723cfd86a3f4b520872b4e2f07220fb14 /demux/demux_lavf.c | |
parent | 137c1032faca14b922fc79d8813eabf095be9c35 (diff) | |
download | mpv-3face4300ed01d0b9394efab4dfdcf997cc48704.tar.bz2 mpv-3face4300ed01d0b9394efab4dfdcf997cc48704.tar.xz |
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.
Diffstat (limited to 'demux/demux_lavf.c')
-rw-r--r-- | demux/demux_lavf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c index 5eebffc2f9..2141d3ab0a 100644 --- a/demux/demux_lavf.c +++ b/demux/demux_lavf.c @@ -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))) |