[FFmpeg-devel] [PATCH 5/5] lavf/mpegts: use AVERROR_INVALIDDATA instead of AVERROR(EINTR).
Nicolas George
george at nsup.org
Fri Nov 27 19:16:10 CET 2015
Signed-off-by: Nicolas George <george at nsup.org>
---
libavformat/mpegts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Untested. Offending commit was:
commit df8aa4598c7cc1c2f863f6fc6b2d4b3e6dc7345e
Author: Martin Storsjö <martin at martin.st>
Date: 2012-04-21 20:44:24 +0300
mpegts: Make sure we don't return uninitialized packets
This fixes crashes, where the demuxer could return 0 even
if the returned AVPacket isn't initialized at all. This
could happen if running into EOF or running out of probesize
with non-seekable sources.
Signed-off-by: Martin Storsjö <martin at martin.st>
Truncated input is usually treated as INVALIDDATA if not just EOF.
EINTR is wrong anyway.
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index bc1e03e..c522c6d 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2670,7 +2670,7 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt)
}
if (!ret && pkt->size < 0)
- ret = AVERROR(EINTR);
+ ret = AVERROR_INVALIDDATA;
return ret;
}
--
2.6.2
More information about the ffmpeg-devel
mailing list