[FFmpeg-cvslog] r13516 - trunk/libavformat/flvenc.c

bcoudurier subversion
Thu May 29 02:35:23 CEST 2008


Author: bcoudurier
Date: Thu May 29 02:35:23 2008
New Revision: 13516

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

Modified:
   trunk/libavformat/flvenc.c

Modified: trunk/libavformat/flvenc.c
==============================================================================
--- trunk/libavformat/flvenc.c	(original)
+++ trunk/libavformat/flvenc.c	Thu May 29 02:35:23 2008
@@ -336,7 +336,9 @@ static int flv_write_packet(AVFormatCont
         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);




More information about the ffmpeg-cvslog mailing list