summaryrefslogtreecommitdiff
path: root/doc/examples/filtering_video.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-05-12 23:13:19 +0200
committerClément Bœsch <ubitux@gmail.com>2012-05-19 12:28:59 +0200
commite692b9d5643bb5484c69c20162783636614bba00 (patch)
tree2442ae56ce83f41f103c04b9e684a98030fdd27d /doc/examples/filtering_video.c
parent60ea6b09960052500c2e6fa6d46409dea351ebff (diff)
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 [...]").
Diffstat (limited to 'doc/examples/filtering_video.c')
-rw-r--r--doc/examples/filtering_video.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c
index 2ca6a05497..1985bc5f86 100644
--- a/doc/examples/filtering_video.c
+++ b/doc/examples/filtering_video.c
@@ -198,9 +198,8 @@ int main(int argc, char **argv)
}
if (got_frame) {
- if (frame.pts == AV_NOPTS_VALUE)
- frame.pts = frame.pkt_dts == AV_NOPTS_VALUE ?
- frame.pkt_dts : frame.pkt_pts;
+ frame.pts = av_frame_get_best_effort_timestamp(&frame);
+
/* push the decoded frame into the filtergraph */
av_vsrc_buffer_add_frame(buffersrc_ctx, &frame, 0);