Handle EAGAIN on send_packet in decoder
EAGAIN was only handled on receive_frame. In practice, it should not be necessary, since one packet always contains one frame. But just in case.
This commit is contained in:
parent
2a5dfc1c17
commit
8b90dc61b9
1 changed files with 2 additions and 2 deletions
|
@ -99,8 +99,8 @@ decoder_push(struct decoder *decoder, const AVPacket *packet) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret;
|
int ret = avcodec_send_packet(decoder->codec_ctx, packet);
|
||||||
if ((ret = avcodec_send_packet(decoder->codec_ctx, packet)) < 0) {
|
if (ret < 0 && ret != AVERROR(EAGAIN)) {
|
||||||
LOGE("Could not send video packet: %d", ret);
|
LOGE("Could not send video packet: %d", ret);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue