Skip to content

Commit

Permalink
Fix brackets in buffer logic of the ffmpeg core.
Browse files Browse the repository at this point in the history
  • Loading branch information
hasenbanck committed Jan 11, 2020
1 parent 8032ff6 commit 354c500
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions cores/libretro-ffmpeg/ffmpeg_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,9 +1656,12 @@ static void decode_thread(void *data)
* 3. EOF
**/
if (!packet_buffer_empty(audio_packet_buffer) &&
((next_video_end == 0.0 ||
!eof && earlier_or_close_enough(next_audio_start, next_video_end)) ||
eof))
(
next_video_end == 0.0 ||
(!eof && earlier_or_close_enough(next_audio_start, next_video_end)) ||
eof
)
)
{
packet_buffer_get_packet(audio_packet_buffer, pkt);
last_audio_end = audio_timebase * (pkt->pts + pkt->duration);
Expand All @@ -1675,7 +1678,12 @@ static void decode_thread(void *data)
* 3. EOF
**/
if (!packet_buffer_empty(video_packet_buffer) &&
((!eof && earlier_or_close_enough(next_video_end, last_audio_end)) || !actx_active || eof ))
(
(!eof && earlier_or_close_enough(next_video_end, last_audio_end)) ||
!actx_active ||
eof
)
)
{
packet_buffer_get_packet(video_packet_buffer, pkt);

Expand Down

0 comments on commit 354c500

Please sign in to comment.