Opened 5 years ago

Closed 4 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: 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 (1)

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

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by cehoyos

  • Owner changed from michael to saste
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git

comment:2 in reply to: ↑ description Changed 5 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 5 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 5 years ago by ami_stuff

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

(seems to fix issue 2559 as well)

Changed 5 years ago by ami_stuff

comment:5 Changed 4 years ago by michael

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 Changed 4 years ago by cus

  • Resolution set to fixed
  • Status changed from open to closed

Fixed in commit 7315e40a24e85e7f141db77951a4b14375fde55a.

FFplay will exit from now on on invalid filter configuration.

Note: See TracTickets for help on using tickets.