doc/examples: fix pts heuristic in filtering_video.
Note: the condition looked wrong in the first place ("if DTS is not defined, then set PTS to that undefined value [...]").
This commit is contained in:
parent
60ea6b0996
commit
e692b9d564
@ -198,9 +198,8 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (got_frame) {
|
if (got_frame) {
|
||||||
if (frame.pts == AV_NOPTS_VALUE)
|
frame.pts = av_frame_get_best_effort_timestamp(&frame);
|
||||||
frame.pts = frame.pkt_dts == AV_NOPTS_VALUE ?
|
|
||||||
frame.pkt_dts : frame.pkt_pts;
|
|
||||||
/* push the decoded frame into the filtergraph */
|
/* push the decoded frame into the filtergraph */
|
||||||
av_vsrc_buffer_add_frame(buffersrc_ctx, &frame, 0);
|
av_vsrc_buffer_add_frame(buffersrc_ctx, &frame, 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user