diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-11 05:23:10 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-11 05:23:10 +0000 |
commit | 7d637efa80337f0e5e95e2137ccf7da8e75ad047 (patch) | |
tree | 6724d0dc3b6d329e2787214c34c90b33160c23e9 /libavformat | |
parent | ff1c015d415352fe886cf85b6962d47cdbed1f6d (diff) | |
download | ffmpeg-7d637efa80337f0e5e95e2137ccf7da8e75ad047.tar.gz |
check for negative dts value even if bitstream is already formated,
this fixes dts when stream copying.
Originally committed as revision 16526 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index fc9fc1b58f..b3cce3ab20 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -340,13 +340,14 @@ 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 (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); size = pkt->size; + } /* cast needed to get negative value */ if (!flv->delay && pkt->dts < 0) flv->delay = -pkt->dts; |