Opened 11 years ago

Closed 11 years ago

#1040 closed defect (fixed)

Segmentation fault when decoding consecutive IDR frames

Reported by: peterderivaz Owned by: ksuehring
Priority: minor Milestone: HM-10.1
Component: HM Version: HM-10.0
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

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:

if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence)

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)

IDR.patch (933 bytes) - added by ksuehring 11 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by DefaultCC Plugin

  • Cc fbossen ksuehring davidf jct-vc@… added

comment:2 Changed 11 years ago by ksuehring

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.

Changed 11 years ago by ksuehring

comment:3 Changed 11 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 11 years ago by ksuehring

  • Owner set to ksuehring
  • Status changed from new to assigned

comment:5 Changed 11 years ago by peterderivaz

Thanks a lot! Your patch allows my stream to decode correctly now.

comment:6 Changed 11 years ago by ksuehring

  • Resolution set to fixed
  • Status changed from assigned to closed

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

  • David Flynn(Subscriber)
  • Frank Bossen(Subscriber)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Owner, Subscriber, Participant, Always)
  • Peter de Rivaz(Reporter, Participant)