The parser was fixed so this workaround should no longer be necessary. This allows using stream-copy to fix files with keyframes incorrectly marked.
Unified · Split
| @@ -1638,7 +1638,6 @@ static int matroska_read_header(AVFormatContext *s) · 1637 unmodified lines | |||
| 1638 | st->codec->height * track->video.display_width, | 1638 | st->codec->height * track->video.display_width, |
| 1639 | st->codec-> width * track->video.display_height, | 1639 | st->codec-> width * track->video.display_height, |
| 1640 | 255); | 1640 | 255); |
| 1641 | if (st->codec->codec_id != CODEC_ID_H264) | ||
| 1642 | st->need_parsing = AVSTREAM_PARSE_HEADERS; | 1641 | st->need_parsing = AVSTREAM_PARSE_HEADERS; |
| 1643 | if (track->default_duration) | 1642 | if (track->default_duration) |
| 1644 | st->avg_frame_rate = av_d2q(1000000000.0/track->default_duration, INT_MAX); | 1643 | st->avg_frame_rate = av_d2q(1000000000.0/track->default_duration, INT_MAX); |