comparison flvenc.c @ 3394:02efb6e3eefa libavformat

check if extradata comes from mp4 and assume bitsteam is already formated, should fix streamcopy
author bcoudurier
date Thu, 29 May 2008 00:35:23 +0000
parents 912490c90970
children 7a0230981402
comparison
equal deleted inserted replaced
3393:f95ddc69c48d 3394:02efb6e3eefa
334 assert(size); 334 assert(size);
335 335
336 put_byte(pb, FLV_TAG_TYPE_AUDIO); 336 put_byte(pb, FLV_TAG_TYPE_AUDIO);
337 } 337 }
338 338
339 if (enc->codec_id == CODEC_ID_H264) { 339 if (enc->codec_id == CODEC_ID_H264 &&
340 /* check if extradata looks like mp4 formated */
341 enc->extradata_size > 0 && *(uint8_t*)enc->extradata != 1) {
340 if (ff_avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size) < 0) 342 if (ff_avc_parse_nal_units(pkt->data, &pkt->data, &pkt->size) < 0)
341 return -1; 343 return -1;
342 assert(pkt->size); 344 assert(pkt->size);
343 size = pkt->size; 345 size = pkt->size;
344 /* cast needed to get negative value */ 346 /* cast needed to get negative value */