[vlc-commits] chromecast: reset httpd args in case of error
Thomas Guillem
git at videolan.org
Thu Feb 1 11:26:34 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb 1 09:03:38 2018 +0100| [04d502ed4faaf993702afc90b73731eac28a436e] | committer: Thomas Guillem
chromecast: reset httpd args in case of error
(cherry picked from commit e376e0492867b4f3c85d61e006b6a6f040d2bbe8)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=04d502ed4faaf993702afc90b73731eac28a436e
---
modules/stream_out/chromecast/chromecast_ctrl.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp
index 22e3e5c181..0729980344 100644
--- a/modules/stream_out/chromecast/chromecast_ctrl.cpp
+++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp
@@ -190,13 +190,14 @@ int intf_sys_t::httpd_file_fill( uint8_t *psz_request, uint8_t **pp_data, int *p
if( !*pp_data )
return VLC_EGENERIC;
- *pi_data = size;
ssize_t read = vlc_stream_Read( m_art_stream, *pp_data, size );
if( read < 0 || (size_t)read != size )
{
free( *pp_data );
+ *pp_data = NULL;
return VLC_EGENERIC;
}
+ *pi_data = size;
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list