Commit bf4c8313 authored by michael's avatar michael

try to set next_pts to a reasonable value in case of streamcopy


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3753 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 20440da3
......@@ -1175,6 +1175,19 @@ static int output_packet(AVInputStream *ist, int ist_index,
goto fail_decode;
}
} else {
switch(ist->st->codec.codec_type) {
case CODEC_TYPE_AUDIO:
ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec.frame_size) /
(ist->st->codec.sample_rate * ist->st->codec.channels);
break;
case CODEC_TYPE_VIDEO:
if (ist->st->codec.frame_rate_base != 0) {
ist->next_pts += ((int64_t)AV_TIME_BASE *
ist->st->codec.frame_rate_base) /
ist->st->codec.frame_rate;
}
break;
}
data_buf = ptr;
data_size = len;
ret = len;
......
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