vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Sep 1 18:15:39 2015 +0300| [b79f1e23274f6f11fc2178fb0a47f5f0be199e6f] | committer: Rémi Denis-Courmont
stream: remove/fix fatal error case > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b79f1e23274f6f11fc2178fb0a47f5f0be199e6f --- src/input/stream.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/input/stream.c b/src/input/stream.c index d3f10be..eab1819 100644 --- a/src/input/stream.c +++ b/src/input/stream.c @@ -413,13 +413,11 @@ ssize_t stream_Peek(stream_t *s, const uint8_t **restrict bufp, size_t len) { size_t avail = peek->i_buffer; - peek = block_Realloc(peek, 0, len); - priv->peek = peek; + peek = block_TryRealloc(peek, 0, len); if (unlikely(peek == NULL)) - { - s->b_error = true; /* unrecoverable error */ return VLC_ENOMEM; - } + + priv->peek = peek; peek->i_buffer = avail; ssize_t ret = stream_ReadRaw(s, peek->p_buffer + avail, len - avail); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
