aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/flvenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-05-29 00:35:23 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-05-29 00:35:23 +0000
commitc2acba13a450869ff749ad2c5077f3902810d204 (patch)
treea0390de2e155e14be84b169925c7978fe9f64f54 /libavformat/flvenc.c
parent390b25aeda1e36df54366e1f5e821ecb0147ea54 (diff)
downloadffmpeg-c2acba13a450869ff749ad2c5077f3902810d204.tar.gz
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
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r--libavformat/flvenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index a0fbd53d2d..40654bf507 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -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);