Commit 488e9a06 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

ffmdec: only seek back at EOF if a server is attached

Otherwise the ffm demuxer can return the same packets endlessly, if
there is no server attached.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 3c4e4918
......@@ -100,7 +100,10 @@ static int ffm_read_data(AVFormatContext *s,
len = size;
if (len == 0) {
if (avio_tell(pb) == ffm->file_size)
avio_seek(pb, ffm->packet_size, SEEK_SET);
if (ffm->server_attached)
avio_seek(pb, ffm->packet_size, SEEK_SET);
else
return AVERROR_EOF;
retry_read:
if (pb->buffer_size != ffm->packet_size) {
int64_t tell = avio_tell(pb);
......
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