unosquare / ffmediaelement

FFME: The Advanced WPF MediaElement (based on FFmpeg)
https://unosquare.github.io/ffmediaelement/
Other
1.18k stars 244 forks source link

Fix of FFmpegLoadMode.MinimumFeatures #482

Closed gaborposz closed 4 years ago

gaborposz commented 4 years ago

Skip FilterGraph initialization when Lib AVFilter is disabled (to avoid forced loading of AVFilter and its dependencies). See #480

mariodivece commented 4 years ago

Thanks for the PR. What about the call the InitializeFilterGraph in the audio component? I think that is required too? Did you test with media files that include audio components?

gaborposz commented 4 years ago

Actually the audio was working, due to the following code in InitializeFilterGraph:

            // For empty filter strings ensure filtegraph is destroyed
            if (string.IsNullOrWhiteSpace(filterString))
            {
                DestroyFilterGraph();
                return;
            }

The filterString was null, so it returned before the ffmpeg.avfilter_graph_alloc() call.

I don't know when filterString will have a non-null value, so I added the check to the AudioComponent's InitializeFilterGraph method as well.

Thank you for the feedback!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.