[mythtv] decoding HD-PVR H.264

john jppoet at gmail.com
Tue Feb 3 03:18:40 UTC 2009


Whenever myth seeks to a new point in a HD-PVR recording, it looks up  
the closest keyframe position in the recordedseek table, and seeks to  
that point in the file.  The frame is read, and  
AvFormatDecoder::GetFrame() passes it to avcodec_decode_video(), which  
passed it to decode_frame() in libs/libavcodec/h264.c.

After that seek, the very next frame is a keyframe, but libavcodec/ 
h264.c will kick it back with the warning:

[h264 @ 0xf39300]mmco: unref short failure

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".

Thanks,

John



More information about the mythtv-dev mailing list