We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0511540 commit 3947bd0Copy full SHA for 3947bd0
1 file changed
samples/RhythmGame/src/main/cpp/audio/FFMpegExtractor.cpp
@@ -252,7 +252,12 @@ int64_t FFMpegExtractor::decode(
252
253
// Retrieve our raw data from the codec
254
result = avcodec_receive_frame(codecContext.get(), decodedFrame);
255
- if (result != 0) {
+ if (result == AVERROR(EAGAIN)) {
256
+ // The codec needs more data before it can decode
257
+ avPacket.size = 0;
258
+ avPacket.data = nullptr;
259
+ continue;
260
+ } else if (result != 0) {
261
LOGE("avcodec_receive_frame error: %s", av_err2str(result));
262
goto cleanup;
263
}
0 commit comments