Commit 0d354897 authored by bellard's avatar bellard

avoid initializing pts for not decoded streams


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2284 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 392cd1f8
...@@ -1121,18 +1121,20 @@ static int av_encode(AVFormatContext **output_files, ...@@ -1121,18 +1121,20 @@ static int av_encode(AVFormatContext **output_files,
ist = ist_table[i]; ist = ist_table[i];
is = input_files[ist->file_index]; is = input_files[ist->file_index];
ist->pts = 0; ist->pts = 0;
switch (ist->st->codec.codec_type) { if (ist->decoding_needed) {
case CODEC_TYPE_AUDIO: switch (ist->st->codec.codec_type) {
av_frac_init(&ist->next_pts, case CODEC_TYPE_AUDIO:
0, 0, is->pts_num * ist->st->codec.sample_rate); av_frac_init(&ist->next_pts,
break; 0, 0, is->pts_num * ist->st->codec.sample_rate);
case CODEC_TYPE_VIDEO: break;
av_frac_init(&ist->next_pts, case CODEC_TYPE_VIDEO:
0, 0, is->pts_num * ist->st->codec.frame_rate); av_frac_init(&ist->next_pts,
break; 0, 0, is->pts_num * ist->st->codec.frame_rate);
default: break;
break; default:
} break;
}
}
} }
/* compute buffer size max (should use a complete heuristic) */ /* compute buffer size max (should use a complete heuristic) */
......
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