Message ID | 1555316150-7192-1-git-send-email-bweaglegao@126.com |
---|---|
State | New |
Headers | show |
On Mon, Apr 15, 2019 at 04:15:50PM +0800, Lance.Gao wrote: > Signed-off-by: Lance.Gao <bweaglegao@126.com> > --- > libavformat/flvdec.c | 2 ++ > 1 file changed, 2 insertions(+) "fix the problem of packet mismatch while reading rtmp stream" this is too vague, its not clear what problem this is about, or how this fixes it [...]
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index b531a39..bc63dd2 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1003,6 +1003,8 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) int orig_size; retry: + if (avio_feof(s->pb)) + return AVERROR_EOF; /* pkt size is repeated at end. skip it */ pos = avio_tell(s->pb); type = (avio_r8(s->pb) & 0x1F);
Signed-off-by: Lance.Gao <bweaglegao@126.com> --- libavformat/flvdec.c | 2 ++ 1 file changed, 2 insertions(+)