Skip to content

Commit

Permalink
fix crash or deadlock in mlt_events_disconnect()
Browse files Browse the repository at this point in the history
regression in b4943c5
  • Loading branch information
ddennedy committed Sep 12, 2023
1 parent 665e4af commit 8a821cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/avformat/producer_avformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -3858,7 +3858,8 @@ static void producer_avformat_close(producer_avformat self)
{
mlt_log_debug(NULL, "producer_avformat_close\n");

mlt_events_disconnect(MLT_PRODUCER_PROPERTIES(self->parent), self);
if (self->parent && self->parent->close)
mlt_events_disconnect(MLT_PRODUCER_PROPERTIES(self->parent), self);

// Cleanup av contexts
av_packet_unref(&self->pkt);
Expand Down

1 comment on commit 8a821cc

@bmatherly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you test this fix as an alternative solution? #951

I think we could combine the two solutions. But it would be good to know if this is the real root cause.

Please sign in to comment.