jamaal81 / lavfilters

Automatically exported from code.google.com/p/lavfilters
GNU General Public License v2.0
0 stars 0 forks source link

LAV Hangs on WAV File #479

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the issue you're having:
Using Zoom Player (v9.2) with latest version of LAV (0.62). Playing a 
particular WAV file will instantly hang Zoom Player. Setting Zoom to use AC3 
Filter for the WAV file, and there is no problem - the player only hangs when 
LAV is used as the audio decoder. Tried a build of ffmpeg - and the ffplay 
module opens the file fine, so looks like the issue may be LAV specifically.

How can the issue be reproduced? Sample File?
Install Zoom Player, leave everything as the default (no changes to the Smart 
Play profiles). With LAV installed, download the sample file and open the WAV 
file with Zoom Player (ignore the video file in the sample archive). At this 
point, Zoom Player should hang. If you then add a Smart Play profile for AC3 
Filter to the PCM Smart Play profile, Zoom uses AC3 Filter instead of LAV for 
the WAV file, and does not hang.

What version of the product are you using? In which Player?
LAV v0.62, Zoom Player v9.2

Please provide any additional information below.
Sample file: https://dl.dropboxusercontent.com/u/105555957/samples.zip (855KB)

Original issue reported on code.google.com by forum.an...@gmail.com on 2 Sep 2014 at 7:04

GoogleCodeExporter commented 9 years ago
I don't have ZoomPlayer handy right now, but the file plays just perfectly in 
any other players I've tried.

Original comment by h.lepp...@gmail.com on 2 Sep 2014 at 11:26

GoogleCodeExporter commented 9 years ago
Interestingly, MediaInfo reports the WAV file as PCM. In Zoom Player, the 
Windows wave parser attempts to send the audio to LAV, and LAV rejects the 
audio as being AC3 format (sub type 00000001-0000-0010-8000-00AA00389B71).

Original comment by forum.an...@gmail.com on 2 Sep 2014 at 12:46

GoogleCodeExporter commented 9 years ago
The original issue that lead to this report was from a user who had Zoom Player 
hang when they played the MP4 file in that archive, with the Zoom Player 'Load 
External Audio Tracks' option enabled (so the MP4 file would play and Zoom 
would attempt to load the WAV file as the audio). This was when using LAV as 
the audio decoder. That does indeed hang Zoom - but I understand from bLight 
that he has reported this issue to you previously.

Original comment by forum.an...@gmail.com on 2 Sep 2014 at 12:58

GoogleCodeExporter commented 9 years ago
LAV Audio Decoder doesn't accept raw PCM audio, unless its from LAV Splitter.

Its a protection to avoid useless instances in the graph, or even repeated 
filters, since its a decoder, and not a processor. There is one exception for 
LAV Splitter, because of some complexity when dealing with files that contain 
both raw PCM and a compressed stream (so you can switch between streams 
properly).

If you're using the Wave Parser, simply connect its output to the audio 
renderer, or use LAV Splitter to read the file, which then can connect to LAV 
Audio.
No idea why the player would hang from this, i guess it doesn't like graph 
building failures?

Original comment by h.lepp...@gmail.com on 6 Sep 2014 at 1:23

GoogleCodeExporter commented 9 years ago
nev: See the following post in your LAV thread, and the follow-on replies to 
that:
https://www.doom9.org/showthread.php?p=1565754#post1565754

That is all related to this report.

We're trying to trace this issue in Zoom Player's code to get an in-depth 
understanding of what's going on.

When Zoom Player's DSP filter receives the stop event (a few other events are 
affected as well), it calls the "Inactivate" method on the input pin (which 
doesn't return any error) and then tries to lock the critical section to 
receive the buffers.

Would you have any idea why it would deadlock if the input pin (which I believe 
is the source of the other locking thread) is supposed to be disabled?

Zoom Player's DSP code is based on the DS-DSP filter by the way, which dcoder 
donated for Zoom Player's use many years ago.

Original comment by forum.an...@gmail.com on 7 Sep 2014 at 12:06

GoogleCodeExporter commented 9 years ago
For info, the DSP source code is here:
http://download.dsp-worx.de/?f=DCDSPFilter_v1.03_Source.zip

Function TDCDSPFilter.Stop: HRESULT; is the function it freezes in, on line 
"FcsReceive.Lock;"

Original comment by forum.an...@gmail.com on 7 Sep 2014 at 12:09