aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-09-23 21:43:43 -0400
committerReinhard Tartler <siretart@tauware.de>2012-03-18 17:50:17 +0100
commitce80957cf10e2ddbdbe6f74912c69228a8efaf35 (patch)
tree60c42572d0a350f3c56e3e7b085453684d73313f /libavformat
parent74f4c1358c27d168bd346d3d3db6a097b9f71558 (diff)
downloadffmpeg-ce80957cf10e2ddbdbe6f74912c69228a8efaf35.tar.gz
sol: return error if av_get_packet() fails.
This prevents sending a packet with data=NULL size=AVERROR_EOF. (cherry picked from commit b15a9888a8f8e8cc9784ffd8d5d0307900fb78bb) Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/sol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 1ebb4d2e30..83e85c882e 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -132,6 +132,8 @@ static int sol_read_packet(AVFormatContext *s,
if (s->pb->eof_reached)
return AVERROR(EIO);
ret= av_get_packet(s->pb, pkt, MAX_SIZE);
+ if (ret < 0)
+ return ret;
pkt->stream_index = 0;
/* note: we need to modify the packet size here to handle the last