mltframework / mltframework/mlt

There may be an error when disconnecting a filter service from the field

Open
#1,058 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.9k
Forks
387
Avg merge
17h 28m
Merged PRs (30d)
8

Description

Hi,
When a field connect to the filter, it's with a track index value.

https://github.com/mltframework/mlt/blob/bddc2c30730d93821c1fd9c209a278d4798e42aa/src/framework/mlt_field.c#L169

In this function, the producer member of the field will be replace by this filter, and the old producer member will connect to the filter as input producer at the track index.
But when disconnecting a filter service from the field by fellow function,

https://github.com/mltframework/mlt/blob/bddc2c30730d93821c1fd9c209a278d4798e42aa/src/framework/mlt_field.c#L241

The corresponding old producer is not correctly obtained through the track index of this filter. Cause function mlt_service_producer returns the last one, not the one specified by track index

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/framework/mlt_field.c at the referenced connection code around lines 169 and 241. Trace how the filter's track index is stored and how mlt_service_producer selects a producer; done means disconnecting the filter restores the producer corresponding to that track index rather than the last producer.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.