Commit ef30f24f authored by aurel's avatar aurel

Matroska muxer needs to format all NAL units, not only extradata.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11510 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 048aa6d7
......@@ -745,6 +745,16 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
av_md5_update(mkv->md5_ctx, pkt->data, FFMIN(200, pkt->size));
}
if (codec->codec_id == CODEC_ID_H264 &&
codec->extradata_size > 0 && AV_RB32(codec->extradata) == 0x00000001) {
/* from x264 or from bytestream h264 */
/* nal reformating needed */
int ret = avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size);
if (ret < 0)
return ret;
assert(pkt->size);
}
if (codec->codec_type != CODEC_TYPE_SUBTITLE) {
mkv_write_block(s, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment