[FFmpeg-devel] [PATCH 2/4] tty: disable extension matching

Clément Bœsch ubitux at gmail.com
Fri Aug 9 07:56:38 CEST 2013


On Thu, Aug 08, 2013 at 01:04:37AM +0200, wm4 wrote:
> This demuxer isn't very useful and causes more trouble than it solves.
> In psrticular, it matches .txt files too eagerly. It should be left to
> the application what to do with text files, and ana pplication shouldn't
> be forced to blacklist libavformat fringe demuxers.
> ---
>  libavformat/tty.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavformat/tty.c b/libavformat/tty.c
> index 3afb9b2..ec39687 100644
> --- a/libavformat/tty.c
> +++ b/libavformat/tty.c
> @@ -155,6 +155,5 @@ AVInputFormat ff_tty_demuxer = {
>      .priv_data_size = sizeof(TtyDemuxContext),
>      .read_header    = read_header,
>      .read_packet    = read_packet,

> -    .extensions     = "ans,art,asc,diz,ice,nfo,txt,vt",

I think it would be better to just disable the problematic extension(s).
There is no probe function, so picking the tty demuxer only rely on those
extensions.

Also, I must admit I kind of enjoyed seeing scrolling text of the .nfo
when trying a mplayer * by mistake in a movie directory a while ago... :)

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130809/234aa61e/attachment.asc>


More information about the ffmpeg-devel mailing list