The rtsp protocol requires the client to send a packet at the end of the
connexion.
FFmpeg basic network function check wether the user aborted the
communication and don't send the packet in this case.
So the protocol is not respected.
This commit removes the check. An other possibility would have to add an
extra parameter to these functions to force the packet sending.

https://trac.ffmpeg.org/ticket/4929

Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis-lama...@gmail.com>
From 415ea8cad8cd4df9c32229918ccb0c84ca2c1c4a Mon Sep 17 00:00:00 2001
From: Nicolas Adenis-Lamarre <nicolas.adenis-lama...@gmail.com>
Date: Sun, 18 Oct 2015 22:02:47 +0200
Subject: [PATCH] rtsp protocol : teardown packet not sent

The rtsp protocol requires the client to send a packet at the end of the connexion.
FFmpeg basic network function check wether the user aborted the communication and don't send the packet in this case.
So the protocol is not respected.
This commit removes the check. An other possibility would have to add an extra parameter to these functions to force the packet sending.

Signed-off-by: Nicolas Adenis-Lamarre <nicolas.adenis-lama...@gmail.com>
---
 libavformat/avio.c    | 2 --
 libavformat/network.c | 2 --
 2 files changed, 4 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 21713d9..523947f 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -321,8 +321,6 @@ static inline int retry_transfer_wrapper(URLContext *h, uint8_t *buf,
 
     len = 0;
     while (len < size_min) {
-        if (ff_check_interrupt(&h->interrupt_callback))
-            return AVERROR_EXIT;
         ret = transfer_func(h, buf + len, size - len);
         if (ret == AVERROR(EINTR))
             continue;
diff --git a/libavformat/network.c b/libavformat/network.c
index 7a326d2..fa00ce8 100644
--- a/libavformat/network.c
+++ b/libavformat/network.c
@@ -85,8 +85,6 @@ int ff_network_wait_fd_timeout(int fd, int write, int64_t timeout, AVIOInterrupt
     int64_t wait_start = 0;
 
     while (1) {
-        if (ff_check_interrupt(int_cb))
-            return AVERROR_EXIT;
         ret = ff_network_wait_fd(fd, write);
         if (ret != AVERROR(EAGAIN))
             return ret;
-- 
2.1.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to