Commit 85a4a2d1 authored by NzSN's avatar NzSN

Change condition to trigger AVERROR_EOF of mmRead()

parent 4f448f9c
...@@ -18,13 +18,10 @@ static int mmRead(void *priv, uint8_t *buf, int size) { ...@@ -18,13 +18,10 @@ static int mmRead(void *priv, uint8_t *buf, int size) {
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if (protoIsFlagSeted(&proto->Base, PROTO_FLAG_EOF)) {
return AVERROR_EOF;
}
// No Datas // No Datas
if (mmcEmpty(context) && listEmpty(buffers)) { if (mmcEmpty(context) && listEmpty(buffers)) {
return AVERROR(EAGAIN); return protoIsFlagSeted(&proto->Base, PROTO_FLAG_EOF) ?
AVERROR_EOF : AVERROR(EAGAIN);
} }
if (mmcEmpty(context)) { if (mmcEmpty(context)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment