Ticket #38 (closed defect: fixed)
FFplay hangs when a non existing filter is passed at the command line option
| Reported by: | ami_stuff | Owned by: | saste |
|---|---|---|---|
| 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
Change History
comment:1 Changed 2 years ago by cehoyos
- Owner changed from michael to saste
- Status changed from new to open
- Version changed from unspecified to git
- Reproduced by developer set
comment:2 in reply to: ↑ description Changed 2 years ago by saste
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 Changed 2 years ago by ami_stuff
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 Changed 2 years ago by ami_stuff
Here is an ugly workaround to exit when avfilter fails :P
(seems to fix issue 2559 as well)



