1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
Andreas Cadhalpun 2015-12-02 22:25:55 +01:00
parent 3c4e49187f
commit 488e9a06f0

View File

@ -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);