aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorspiff <spiff@xbmc.org>2012-01-17 22:47:36 +0100
committerspiff <spiff@xbmc.org>2012-01-17 22:50:13 +0100
commit919a875b4bc4ea2a8ddc0aab98ea74c6475f9525 (patch)
tree53f120db03614f9768df8228474b382e48dd3de3 /lib
parente6460bea9b1fb33a1cd43916cb02f755eb93eac2 (diff)
fixed: playback from mmst:// urls would halt after some time.
this backports upstream 275189a2bd71cf49d66374c44d3de2262d323460 thanks to johoja for doing the ground work
Diffstat (limited to 'lib')
-rw-r--r--lib/ffmpeg/libavformat/mmst.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ffmpeg/libavformat/mmst.c b/lib/ffmpeg/libavformat/mmst.c
index 8464d3b3d1..385f017948 100644
--- a/lib/ffmpeg/libavformat/mmst.c
+++ b/lib/ffmpeg/libavformat/mmst.c
@@ -290,8 +290,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst)
return read_result < 0 ? read_result : AVERROR_IO;
}
packet_type= AV_RL16(mms->in_buffer+36);
- hr = AV_RL32(mms->in_buffer + 40);
- if (hr) {
+ if (read_result >= 44 && (hr = AV_RL32(mms->in_buffer + 40))) {
av_log(NULL, AV_LOG_ERROR,
"Server sent an error status code: 0x%08x\n", hr);
return AVERROR_UNKNOWN;