Skip to content

Commit

Permalink
Fix segfault when adding sources simultaneously (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomskikh authored Sep 13, 2024
1 parent 2e6bc98 commit b4147b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions savant/deepstream/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,6 @@ def _on_source_caps(
source_info.src_resolution = Resolution(width, height)
self._sources.update_source(source_info)

if not source_info.after_demuxer:
self._add_source_output(source_info)
input_src_pad = self._add_input_converter(
new_pad,
new_pad_caps,
Expand All @@ -484,6 +482,10 @@ def _on_source_caps(
)
self._link_to_muxer(input_src_pad, source_info)
self._check_pipeline_is_running()

if not source_info.after_demuxer:
self._add_source_output(source_info)

self._pipeline.set_state(Gst.State.PLAYING)

except PipelineIsNotRunningError:
Expand Down

0 comments on commit b4147b0

Please sign in to comment.