changeset 4189:b545084af4b9 libavformat

check for negative dts value even if bitstream is already formated, this fixes dts when stream copying.
author bcoudurier
date Sun, 11 Jan 2009 05:23:10 +0000
parents d2093f4132df
children 4aa129f6efc0
files flvenc.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flvenc.c	Sat Jan 10 09:56:07 2009 +0000
+++ b/flvenc.c	Sun Jan 11 05:23:10 2009 +0000
@@ -340,13 +340,14 @@
         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;