Merge pull request #533 from sorayuki/patch-1

libff: Fix a race condition crash when handling clocks
This commit is contained in:
Gol-D-Ace 2016-04-21 04:18:55 +02:00
commit 674706ac6e

View File

@ -344,15 +344,15 @@ void ff_demuxer_reset(struct ff_demuxer *demuxer)
packet.clock = clock;
if (demuxer->audio_decoder != NULL) {
ff_clock_retain(clock);
packet_queue_put(&demuxer->audio_decoder->packet_queue,
&packet);
ff_clock_retain(clock);
}
if (demuxer->video_decoder != NULL) {
ff_clock_retain(clock);
packet_queue_put(&demuxer->video_decoder->packet_queue,
&packet);
ff_clock_retain(clock);
}
}