[FFmpeg-cvslog] avcodec/h264_sei: ff_h264_decode_sei: dont try to parse trailing zeroes

Michael Niedermayer git at videolan.org
Wed Nov 5 10:32:33 CET 2014


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 16 03:57:00 2014 +0200| [a5cc8775cf1d276189a22a244f3e487782a36fd4] | committer: Carl Eugen Hoyos

avcodec/h264_sei: ff_h264_decode_sei: dont try to parse trailing zeroes

reduces noise for tserrors.ts

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 688a40b4ed7d2e07d3f96c2feecf785a4866e60c)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5cc8775cf1d276189a22a244f3e487782a36fd4
---

 libavcodec/h264_sei.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index aa889b8..8e1697a 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -281,7 +281,7 @@ static int decode_display_orientation(H264Context *h)
 
 int ff_h264_decode_sei(H264Context *h)
 {
-    while (get_bits_left(&h->gb) > 16) {
+    while (get_bits_left(&h->gb) > 16 && show_bits(&h->gb, 16)) {
         int type = 0;
         unsigned size = 0;
         unsigned next;



More information about the ffmpeg-cvslog mailing list