diff utils.c @ 1245:e59b75051ded libavformat

dont be too picky about timestampsbeing wrong if the destination container is without timestamps and raw of the raw video / raw audio sort
author michael
date Tue, 08 Aug 2006 20:31:19 +0000
parents 1a14fff172ca
children d06e5cb7fb52
line wrap: on
line diff
--- a/utils.c	Tue Aug 08 19:55:32 2006 +0000
+++ b/utils.c	Tue Aug 08 20:31:19 2006 +0000
@@ -2402,7 +2402,7 @@
     int ret;
 
     ret=compute_pkt_fields2(s->streams[pkt->stream_index], pkt);
-    if(ret<0)
+    if(ret<0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
         return ret;
 
     truncate_ts(s->streams[pkt->stream_index], pkt);
@@ -2509,7 +2509,7 @@
         return 0;
 
 //av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %Ld %Ld\n", pkt->size, pkt->dts, pkt->pts);
-    if(compute_pkt_fields2(st, pkt) < 0)
+    if(compute_pkt_fields2(st, pkt) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
         return -1;
 
     if(pkt->dts == AV_NOPTS_VALUE)