From 97493bfb119cfc9df47d11e25fc0399234dd8af1 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 12 Jun 2015 15:58:49 +0800 Subject: [PATCH] fix libflv parser bug --- src/demo/other/libflv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/demo/other/libflv.c b/src/demo/other/libflv.c index 1ef9647cb..d3f675d4a 100755 --- a/src/demo/other/libflv.c +++ b/src/demo/other/libflv.c @@ -496,7 +496,7 @@ static tb_size_t tb_flv_video_h264_sps_analyze_get_exp_golomb(tb_static_stream_r ++nbits; b <<= 1; } - return (b - 1 + tb_static_stream_read_ubits32(sstream, nbits)); + return (b - 1 + (nbits? tb_static_stream_read_ubits32(sstream, nbits) : 0)); } #endif