[mythtv] decoding HD-PVR H.264

john jppoet at gmail.com
Tue Feb 3 16:53:30 UTC 2009

On Feb 3, 2009, at 9:32 AM, David Engel wrote:

> On Mon, Feb 02, 2009 at 08:18:40PM -0700, john wrote:
>> While libavcodec/h264.c does treat that as a warning and not an  
>> error,
>> that warning causes it to not set the gotpicture flag.  Because
>> gotpicture is false, AvFormatDecoder::GetFrame() will continue onto  
>> the
>> next frame.  That one fails, because it is not a keyframe (and it  
>> failed
>> to parse the previous frame):
>> [h264 @ 0xf39300]B picture before any references, skipping
>> [h264 @ 0xf39300]decode_slice_header error
>> [h264 @ 0xf39300]no frame!
>> AFD Error: Unknown decoding error
>> Can anyone help me understand why decode_frame() kicks back the  
>> keyframe
>> with that "unref short failure"?  I though keyframes where "self
>> contained".
> I've seen those errors myself.  It could be the cause of, or at least
> related to, a problem I've started to look into.  Most of the time
> after skipping forward or backward on HD-PVR recording, I will get a
> prebuffering pause about 0.5 seconds after playback resumes.
> David

Janne has explained to me that I-frames in H.264 are not self- 
contained.  Only IDR frames are self-contained.  He says that H.264  
streams which do not have IDR frames, use SEI, but the SEI are not  

I will probably try changing the H264Parser to mark IDR and SEI frames  
in the seektable, instead of I-frames.


More information about the mythtv-dev mailing list