Opened 13 months ago
Last modified 12 months ago
#11628 new defect
Ogg: Bad keyframe validation
| Reported by: | Bernat | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | |
| Cc: | Bernat | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description (last modified by )
FFmpeg shows the error "Broken file, keyframe not correctly marked" on valid files.
I think this is a bug in the function that validates keyframes, ogg_validate_keyframe. This function will check every packet/frame against the granulepos of the page, instead of the calculated granulepos of the packet/frame.
This means that any page that mixes both keyframes and non-keyframes will display the error, even though the frames are correctly marked.
Decoders should calculate their own granulepos for every packet/frame and use the page granulepos as a reset mechanism for when the stream is corrupted.
Ogv files produced by FFmpeg never seem to mix both types of frames in the same page and don't trigger this error. The Theora example encoder produces files that trigger the error. I think the Ogg specification doesn't require frame types not to be mixed in the same page.
Thanks!
Change History (1)
comment:1 by , 12 months ago
| Description: | modified (diff) |
|---|---|
| Summary: | Ogg: Broken file, keyframe not correctly marked → Ogg: Bad keyframe validation |
| Version: | unspecified → git-master |



I've updated the ticket after looking deeper into it. It looks definitely like a bug.