diff options
| author | Timotej Lazar <timotej.lazar@araneo.si> | 2020-05-31 13:02:27 +0200 |
|---|---|---|
| committer | Timotej Lazar <timotej.lazar@araneo.si> | 2020-05-31 13:02:27 +0200 |
| commit | 2793d4f39b78ff2a4a5d40ad983753312d327a73 (patch) | |
| tree | 68ae85094840c97ca4c8548b84e40b63489e4ac2 | |
| parent | 1fa524ff67f44ea6736c72492ea6b84e45e6c907 (diff) | |
Bink: s/ReadFrame/ReadPacket
| -rw-r--r-- | src/bink.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -265,14 +265,14 @@ static int DecodeAudioFrame(struct binkMovie* aMovie) return 1; } -static int ReadFrame(struct binkMovie* aMovie) +static int ReadPacket(struct binkMovie* aMovie) { // Read from file if no packet is buffered. if (!aMovie->packet.buf && av_read_frame(aMovie->avContext, &aMovie->packet) < 0) { // No more packets in file. if (aMovie->looping) { av_seek_frame(aMovie->avContext, -1, 0, 0); - return ReadFrame(aMovie); + return ReadPacket(aMovie); } else { // Drain buffered frames. if (aMovie->videoStreamIndex >= 0) @@ -377,7 +377,7 @@ static int BinkStartMovie(struct binkMovie* aMovie, const char* aFilename, if (!aFmvFlag) { for (int i = 0; i < (FRAMEQUEUESIZE-1) * numStreams; i++) - ReadFrame(aMovie); + ReadPacket(aMovie); } return 1; @@ -389,7 +389,7 @@ static int BinkUpdateMovie(struct binkMovie* aMovie) return 0; const int t = SDL_GetTicks(); - const int eof = !ReadFrame(aMovie); + const int eof = !ReadPacket(aMovie); int playing = 0; if (aMovie->videoStreamIndex >= 0) { @@ -479,7 +479,7 @@ int PlayMusicBink(int volume) int processedBuffers = 0; alGetSourcei(musicMovie.alSource, AL_BUFFERS_PROCESSED, &processedBuffers); if (processedBuffers + musicMovie.alNumFreeBuffers > 0) - if (!ReadFrame(&musicMovie)) + if (!ReadPacket(&musicMovie)) return 0; } return 1; |
