[FFmpeg-devel] [PATCH] avcodec/hevc_sei: fix amount of bits skipped when reading picture timing SEI message

James Almer jamrial at gmail.com
Wed May 10 21:09:32 EEST 2017


On 5/10/2017 8:06 AM, Michael Niedermayer wrote:
> On Tue, May 09, 2017 at 12:29:55PM -0300, James Almer wrote:
>> The code was skipping the entire reported SEI message size regardless of 
>> the amount of bits read.
>> While in theory safe for NALU where the picture timing SEI message is alone
>> or at the end as we're using the checked bitstream reader, it isn't in any
>> other situation, where every SEI message in the NALU after the picture
>> timing one would potentially fail to parse.
>>
>> Change the function name to one more in line with the rest of file, and
>> remove the bogus "Skipped SEI" debug message while at it.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> No test case, all the files i checked plus those in the FATE suite seem to
>> have one SEI message per NALU, or the Picture Timing SEI as the last one.
>>
>>  libavcodec/hevc_sei.c | 15 +++++++--------
>>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> I think the "skip to match the size" should be done in a single place
> for all SEI units and parsing should probably continue even if a SEI
> unit has a failure of some kind.

Might look into this later.

> 
> the patch is fine too ...

Pushed, thanks.


More information about the ffmpeg-devel mailing list