@@ -189,12 +189,8 @@ long seconds_to_clip_frame(Clip* c, float seconds) {
|
||||
}
|
||||
|
||||
float clip_frame_to_seconds(Clip* c, long clip_frame) {
|
||||
// returns frame number as seconds (decimal)
|
||||
if (c->stream->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
return (double) clip_frame / av_q2d(c->stream->avg_frame_rate);
|
||||
} else {
|
||||
return (double) clip_frame / c->sequence->frame_rate;
|
||||
}
|
||||
// returns frame number in decimal seconds
|
||||
return (float) clip_frame / c->sequence->frame_rate;
|
||||
}
|
||||
|
||||
int retrieve_next_frame(Clip* c, AVFrame* f) {
|
||||
|
||||
Reference in New Issue
Block a user