Skip to content

Commit

Permalink
Engine: fixed apeg_display_video_frame() return value is unused
Browse files Browse the repository at this point in the history
This restores proper decoding behavior of some videos when audio is disabled.
  • Loading branch information
ivan-mogilko committed Jan 28, 2023
1 parent 84730a4 commit c47baf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Engine/libsrc/apeg-1.2.1/mpeg1dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,14 +617,14 @@ int apeg_get_video_frame(APEG_STREAM *stream)

int apeg_display_video_frame(APEG_STREAM *stream)
{
int ret;
int ret = APEG_OK;
APEG_LAYER *layer = (APEG_LAYER*)stream;
if ((ret = setjmp(layer->jmp_buffer)) != 0)
return ret;
if (layer->picture)
{
apeg_display_frame(layer, layer->picture);
}
else
ret = APEG_EOF;
layer->picture = NULL;
return APEG_OK;
return ret;
}
2 changes: 1 addition & 1 deletion Engine/media/video/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ bool TheoraPlayer::NextFrame()

// Update the display frame
_apegStream->frame_updated = 0;
apeg_display_video_frame(_apegStream);
ret = apeg_display_video_frame(_apegStream);
has_video = ret != APEG_EOF;
}

Expand Down

0 comments on commit c47baf3

Please sign in to comment.