History

ffmpeg: use AVFrame.duration instead of AVFrame.pkt_duration

Anton Khirnov committed 4 years ago

Commit de3a1351 parent ccb94ec1 file · +3 −3Browse files

Unified · Split

fftools/ffmpeg.c+3−3
@@ -1115,8 +1115,8 @@ static void do_video_out(OutputFile *of, · 1114 unmodified lines
1115 (nb_filtergraphs == 0 || !filtergraphs[0]->graph_desc) &&1115 (nb_filtergraphs == 0 || !filtergraphs[0]->graph_desc) &&
1116 next_picture &&1116 next_picture &&
1117 ist &&1117 ist &&
1118 lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) {1118 lrintf(next_picture->duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) {
1119 duration = lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base));1119 duration = lrintf(next_picture->duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base));
1120 }1120 }
1121 1121
1122 if (!next_picture) {1122 if (!next_picture) {
@@ -2237,7 +2237,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_ · 1114 unmodified lines
2237 ist->hwaccel_retrieved_pix_fmt = decoded_frame->format;2237 ist->hwaccel_retrieved_pix_fmt = decoded_frame->format;
2238 2238
2239 best_effort_timestamp= decoded_frame->best_effort_timestamp;2239 best_effort_timestamp= decoded_frame->best_effort_timestamp;
2240 *duration_pts = decoded_frame->pkt_duration;2240 *duration_pts = decoded_frame->duration;
2241 2241
2242 if (ist->framerate.num)2242 if (ist->framerate.num)
2243 best_effort_timestamp = ist->cfr_next_pts++;2243 best_effort_timestamp = ist->cfr_next_pts++;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t