Commit 739da1b2 authored by michael's avatar michael

do not randomize unknown timestamps


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3568 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5bf994ba
...@@ -1249,7 +1249,10 @@ static int output_packet(AVInputStream *ist, int ist_index, ...@@ -1249,7 +1249,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
opkt.stream_index= ost->index; opkt.stream_index= ost->index;
opkt.data= data_buf; opkt.data= data_buf;
opkt.size= data_size; opkt.size= data_size;
if(pkt->pts != AV_NOPTS_VALUE)
opkt.pts= pkt->pts + input_files_ts_offset[ist->file_index]; opkt.pts= pkt->pts + input_files_ts_offset[ist->file_index];
else
opkt.pts= AV_NOPTS_VALUE;
opkt.dts= pkt->dts + input_files_ts_offset[ist->file_index]; opkt.dts= pkt->dts + input_files_ts_offset[ist->file_index];
opkt.flags= pkt->flags; opkt.flags= pkt->flags;
......
...@@ -1029,13 +1029,13 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) ...@@ -1029,13 +1029,13 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt)
and the first pack from the other stream, respectively, may also have and the first pack from the other stream, respectively, may also have
been written before. been written before.
So the real data starts at SCR 36000+3*1200. */ So the real data starts at SCR 36000+3*1200. */
pts += 36000 + 3600; if(pts != AV_NOPTS_VALUE) pts += 36000 + 3600;
dts += 36000 + 3600; if(dts != AV_NOPTS_VALUE) dts += 36000 + 3600;
}else{ }else{
pts += PRELOAD; if(pts != AV_NOPTS_VALUE) pts += PRELOAD;
dts += PRELOAD; if(dts != AV_NOPTS_VALUE) dts += PRELOAD;
} }
//av_log(ctx, AV_LOG_DEBUG, "dts:%f pts:%f flags:%d stream:%d\n", dts/90000.0, pts/90000.0, pkt->flags, pkt->stream_index); //av_log(ctx, AV_LOG_DEBUG, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n", dts/90000.0, pts/90000.0, pkt->flags, pkt->stream_index, pts != AV_NOPTS_VALUE);
*stream->next_packet= *stream->next_packet=
pkt_desc= av_mallocz(sizeof(PacketDesc)); pkt_desc= av_mallocz(sizeof(PacketDesc));
pkt_desc->pts= pts; pkt_desc->pts= pts;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment