[vlc-commits] chromecast: delete ids when they fail
Thomas Guillem
git at videolan.org
Thu Jan 25 18:33:27 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 25 18:00:02 2018 +0100| [91b8d962a3427e0d69c2098de45e16753a7bff1b] | committer: Thomas Guillem
chromecast: delete ids when they fail
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91b8d962a3427e0d69c2098de45e16753a7bff1b
---
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 6dc11e0377..25b3e794b0 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