Commit c2acba13 authored by Baptiste Coudurier's avatar Baptiste Coudurier

check if extradata comes from mp4 and assume bitsteam is already formated, should fix streamcopy

Originally committed as revision 13516 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 390b25ae
......@@ -336,7 +336,9 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
put_byte(pb, FLV_TAG_TYPE_AUDIO);
}
if (enc->codec_id == CODEC_ID_H264) {
if (enc->codec_id == CODEC_ID_H264 &&
/* check if extradata looks like mp4 formated */
enc->extradata_size > 0 && *(uint8_t*)enc->extradata != 1) {
if (ff_avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size) < 0)
return -1;
assert(pkt->size);
......
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