Skip to content

Commit

Permalink
fix explicit audio_index and video_index not used
Browse files Browse the repository at this point in the history
The problem occurs when the mlt_service is `avformat` instead of
`avformat-novalidate` and `audio_index` or `video_index` is supplied
that is different than default but not `astream`/`vstream` properties
(legacy project) properties. In that case, the explicit `audio_index` or
`video_index` is ignored because `astream` and `vstream` are set to some
default values. In that case, the project or command line fails to play
the correct stream. TO reproduce `melt some-media-file audio_index=2`,
for example (assuming there is a second audio track at index 2).

regression in 52c5bde
  • Loading branch information
ddennedy committed Sep 25, 2023
1 parent 9bf393c commit c170481
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/modules/avformat/producer_avformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,6 @@ mlt_producer producer_avformat_init(mlt_profile profile, const char *service, ch
mlt_producer_close(producer);
producer = NULL;
} else if (self->seekable) {
mlt_properties_set_int(properties,
"astream",
relative_stream_index(self->audio_format,
AVMEDIA_TYPE_AUDIO,
self->audio_index));
mlt_properties_set_int(properties,
"vstream",
relative_stream_index(self->video_format,
AVMEDIA_TYPE_VIDEO,
self->video_index));
// Close the file to release resources for large playlists - reopen later as needed
if (self->audio_format)
avformat_close_input(&self->audio_format);
Expand Down

0 comments on commit c170481

Please sign in to comment.