Commit 7f321fca authored by Paul B Mahol's avatar Paul B Mahol

mmf: signal EOF

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 9378a90a
...@@ -268,16 +268,13 @@ static int mmf_read_packet(AVFormatContext *s, ...@@ -268,16 +268,13 @@ static int mmf_read_packet(AVFormatContext *s,
MMFContext *mmf = s->priv_data; MMFContext *mmf = s->priv_data;
int ret, size; int ret, size;
if (url_feof(s->pb)) if (url_feof(s->pb) || !mmf->data_size)
return AVERROR(EIO); return AVERROR_EOF;
size = MAX_SIZE; size = MAX_SIZE;
if(size > mmf->data_size) if(size > mmf->data_size)
size = mmf->data_size; size = mmf->data_size;
if(!size)
return AVERROR(EIO);
ret = av_get_packet(s->pb, pkt, size); ret = av_get_packet(s->pb, pkt, size);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
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