[vlc-commits] srt: Remove eof code
Olivier CrĂȘte
git at videolan.org
Tue Oct 16 10:25:37 CEST 2018
vlc | branch: master | Olivier CrĂȘte <olivier.crete at collabora.com> | Mon Jul 23 17:30:32 2018 -0400| [34048bef8ed5e2b5e7c265bfbd0cee1db4b1159b] | committer: Thomas Guillem
srt: Remove eof code
It is possible to get an empty read from libsrt and it should not be treated as
EOF.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=34048bef8ed5e2b5e7c265bfbd0cee1db4b1159b
---
modules/access/srt.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/access/srt.c b/modules/access/srt.c
index a1c9acca50..5b7734310b 100644
--- a/modules/access/srt.c
+++ b/modules/access/srt.c
@@ -212,6 +212,8 @@ static block_t *BlockSRT(stream_t *p_stream, bool *restrict eof)
stream_sys_t *p_sys = p_stream->p_sys;
int i_chunk_size = var_InheritInteger( p_stream, "chunk-size" );
int i_poll_timeout = var_InheritInteger( p_stream, "poll-timeout" );
+ /* SRT doesn't have a concept of EOF for live streams. */
+ VLC_UNUSED(eof);
if ( vlc_killed() )
{
@@ -265,10 +267,7 @@ static block_t *BlockSRT(stream_t *p_stream, bool *restrict eof)
goto out;
}
- msg_Err( p_stream, "failed to receive packet, set EOS (reason: %s)",
- srt_getlasterror_str() );
- *eof = true;
- break;
+ goto out;
}
/* if the poll reports errors for any reason at all
More information about the vlc-commits
mailing list