Opened 11 years ago

Closed 10 years ago

#38 closed defect (fixed)

FFplay hangs when a non existing filter is passed at the command line option

Reported by: ami_stuff Owned by: Stefano Sabatini
Priority: normal Component: ffplay
Version: git Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

for example:

ffplay -vf test <file>

tested with git-N-28799-gf354396.

Attachments (1)

ffplay2.diff (929 bytes ) - added by ami_stuff 11 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Carl Eugen Hoyos, 11 years ago

Owner: changed from Michael Niedermayer to Stefano Sabatini
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit

in reply to:  description comment:2 by Stefano Sabatini, 11 years ago

Replying to ami_stuff:

for example:

ffplay -vf test <file>

tested with git-N-28799-gf354396.

I had a look at it, and came to the conclusion that it is the correct behavior. Indeed the command won't hang but only the video stream won't be shown (for example if there is an audio stream it will).

Filters are configured *after* the codec is open, and the codec is choose when it begins to play or when you switch stream interactively (with 'v' IIRC), so ffplay can't know if there is a failure until you actually switch the stream (because the filter configuration failure may depend on the decoder initialization).

So it looks like the correct behavior, since ffplay will continue to play the audio stream even if the video stream filtergraph configuration failed, which looks like a robustness feature.

Behavior may be changed with a command line option if there is a specific need for it though, please comment (or we could try to decouple filter parsing from codec initialization, but I'm not sure this is possible).

comment:3 by ami_stuff, 11 years ago

I would like to see an audio visualisation if video filter fail and if there is no audio stream, FFplay should just quit, but you must decide if it is possible to implement this without too much work.

comment:4 by ami_stuff, 11 years ago

Here is an ugly workaround to exit when avfilter fails :P

(seems to fix issue 2559 as well)

by ami_stuff, 11 years ago

Attachment: ffplay2.diff added

comment:5 by Michael Niedermayer, 10 years ago

I suggest you post this patch to the mailing list, or to marton directly, maybe such ping would lead to this being fixed quickly

comment:6 by Marton Balint, 10 years ago

Resolution: fixed
Status: openclosed

Fixed in commit 7315e40a24e85e7f141db77951a4b14375fde55a.

FFplay will exit from now on on invalid filter configuration.

Note: See TracTickets for help on using tickets.