From c867a50ec5317e74602798e2e8435cde313b91e9 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 20 Aug 2012 14:34:14 +0100 Subject: MPEG2TSWriter: Fix an off-by-one in the condition for padding This makes a remuxed file play without any decoding warnings, while there still were some occasional warnings with the previous version. Change-Id: I31d73446ded1eeb3da10783c5ef841270563ca12 --- media/libstagefright/MPEG2TSWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media') diff --git a/media/libstagefright/MPEG2TSWriter.cpp b/media/libstagefright/MPEG2TSWriter.cpp index 217c17a..92f12af 100644 --- a/media/libstagefright/MPEG2TSWriter.cpp +++ b/media/libstagefright/MPEG2TSWriter.cpp @@ -934,7 +934,7 @@ void MPEG2TSWriter::writeAccessUnit( size_t offset = copy; while (offset < accessUnit->size()) { - bool lastAccessUnit = ((accessUnit->size() - offset) < 183); + bool lastAccessUnit = ((accessUnit->size() - offset) < 184); // for subsequent fragments of "buffer": // 0x47 // transport_error_indicator = b0 -- cgit v1.1