[vlc-commits] vlc_bits: fix negative remain regression
Francois Cartegnie
git at videolan.org
Fri Oct 26 20:14:19 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Oct 26 20:06:53 2018 +0200| [fd2450ab3ec420fd47c484e0bcecaf451c596147] | committer: Francois Cartegnie
vlc_bits: fix negative remain regression
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd2450ab3ec420fd47c484e0bcecaf451c596147
---
modules/packetizer/hxxx_ep3b.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/packetizer/hxxx_ep3b.h b/modules/packetizer/hxxx_ep3b.h
index 6e134b65a0..2ee86d66d9 100644
--- a/modules/packetizer/hxxx_ep3b.h
+++ b/modules/packetizer/hxxx_ep3b.h
@@ -126,7 +126,7 @@ static size_t hxxx_bsfw_byte_remain_ep3b( const bs_t *s )
struct hxxx_bsfw_ep3b_ctx_s *ctx = (struct hxxx_bsfw_ep3b_ctx_s *) s->p_priv;
if( ctx->i_bytesize == 0 && s->p_start != s->p_end )
ctx->i_bytesize = hxxx_ep3b_total_size( s->p_start, s->p_end );
- return ctx->i_bytesize - ctx->i_bytepos;
+ return (ctx->i_bytesize > ctx->i_bytepos) ? ctx->i_bytesize - ctx->i_bytepos : 0;
}
static const bs_byte_callbacks_t hxxx_bsfw_ep3b_callbacks =
More information about the vlc-commits
mailing list