[vlc-commits] chromecast: delete ids when they fail
Thomas Guillem
git at videolan.org
Fri Jan 26 14:27:06 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 25 18:00:02 2018 +0100| [4a0e25794c8624c9dc9e55c469906051d714c35e] | committer: Jean-Baptiste Kempf
chromecast: delete ids when they fail
(cherry picked from commit 91b8d962a3427e0d69c2098de45e16753a7bff1b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4a0e25794c8624c9dc9e55c469906051d714c35e
---
modules/stream_out/chromecast/cast.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index ff0d175f9a..05e449ff75 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -565,8 +565,8 @@ static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id,
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
- id = p_sys->GetSubId( p_stream, id );
- if ( id == NULL )
+ sout_stream_id_sys_t *next_id = p_sys->GetSubId( p_stream, id );
+ if ( next_id == NULL )
{
block_Release( p_buffer );
return VLC_EGENERIC;
@@ -595,7 +595,10 @@ static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id,
p_sys->previous_state = s;
}
- return sout_StreamIdSend(p_sys->p_out, id, p_buffer);
+ int ret = sout_StreamIdSend(p_sys->p_out, next_id, p_buffer);
+ if (ret != VLC_SUCCESS)
+ Del(p_stream, id);
+ return ret;
}
static void Flush( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
More information about the vlc-commits
mailing list