Unified · Split
| @@ -411,8 +411,10 @@ static int osq_receive_frame(AVCodecContext *avctx, AVFrame *frame) · 410 unmodified lines | ||
| 411 | 411 | ret = ff_decode_get_packet(avctx, s->pkt); |
| 412 | 412 | if (ret == AVERROR_EOF && s->bitstream_size > 0) |
| 413 | 413 | break; |
| 414 | − if (ret < 0) | |
| 414 | + if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN)) | |
| 415 | 415 | return ret; |
| 416 | + if (ret < 0) | |
| 417 | + goto fail; | |
| 416 | 418 | } |
| 417 | 419 | |
| 418 | 420 | size = FFMIN(s->pkt->size - s->pkt_offset, s->max_framesize - s->bitstream_size); |