[vlc-devel] [PATCH] use av_close_input_stream and remove AVFMT_NOFILE hack

Rémi Denis-Courmont remi at remlab.net
Mon Sep 21 08:40:00 CEST 2009

On Sun, 20 Sep 2009 17:25:30 -0700, Baptiste Coudurier
<baptiste.coudurier at gmail.com> wrote:
>> How come does the removal of AVFMT_NOFILE fixes a bug when it is
>> supposed to make no differences?
>> Does it not affect av_find_stream_info() ?

> Sorry, my explanation was not clear, it has a side effect in
> av_find_stream_info indeed: AVFormatContext->file_size will not be
> populated, because no file is present.
> This causes AVFormatContext->bit_rate field not to be populated and
> therefore disabling mxf seeking feature.
> VLC wrapper could populate file_size, though IMHO the good solution is
> to not set AVFMT_NO_FILE.
> AVFMT_NO_FILE is used for image sequences, null input/output for
> example, and file size makes no sense in these situations.

It's not that simple. The data comes from another of VLC plugins, which is
solely responsible for interpreting the media location string. The syntax
of p_demux->psz_path could be misunderstood, or misinterpreted by

IMHO, if ffmpeg actually uses the bit, then this change needs to be

Rémi Denis-Courmont

More information about the vlc-devel mailing list