Opened 12 years ago Closed 12 years ago #1040 closed defect (fixed)Segmentation fault when decoding consecutive IDR frames
Description
If an encoded stream has two consecutive IDR frames then the decoder has a segmentation fault in createNonDBFilterInfoLCU.
The problem appears to be that the code at line 326 of TDecTop.cpp attempts to detect a new picture by spotting a difference in picture order count:
However, IDR frames have the POC reset to 0 so do not have a different POC. This means that the decoder interprets the second picture as a new slice of the first frame and crashes.
Perhaps it is not valid for an encoded stream to have consecutive IDR frames? Attachments (1)Change History (7)comment:1 Changed 12 years ago by DefaultCC Plugin
comment:2 Changed 12 years ago by ksuehringChanged 12 years ago by ksuehringcomment:3 Changed 12 years ago by ksuehring
The attached patch does not really clean up the decoding, but should hopefully work as a fix for the issue. Could you please test it? comment:4 Changed 12 years ago by ksuehring
comment:5 Changed 12 years ago by peterderivaz
Thanks a lot! Your patch allows my stream to decode correctly now. comment:6 Changed 12 years ago by ksuehring
The patch has been applied in r3402 Note: See
TracTickets for help on using
tickets. | This list contains all users that will be notified about changes made to this ticket. These roles will be notified: Reporter, Owner, Subscriber, Participant
|
A stream with consecutive IDR pictures is valid. The start of a new picture can be detected based on first_slice_segment_in_pic_flag being equal to one.