summaryrefslogtreecommitdiff
path: root/libavcodec/crystalhd.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2017-04-23 14:34:03 -0700
committerPhilip Langdale <philipl@overt.org>2017-04-23 15:33:36 -0700
commit181aa1be493416c38c8adf0ce21e7fdac64a039e (patch)
tree0694bb41033be3ef7efc79a55b9b158249343e61 /libavcodec/crystalhd.c
parent960b4d47612ec89cfdf0ff8b83bc7424ad4c754a (diff)
downloadffmpeg-181aa1be493416c38c8adf0ce21e7fdac64a039e.tar.gz
avcodec/crystalhd: Explicitly set frame pts at all times
Previously, the pts value was initialised to AV_NOPTS_VALUE and so it was not necessary to always set it. Now, with the new-new decode API, this is no longer true. I'm not sure why I avoided setting the pts when the decoder value was also AV_NOPTS_VALUE - it clearly wouldn't have changed anything previously, but here we are. Failing to do this, means the frame pts will be some random uninitalised value.
Diffstat (limited to 'libavcodec/crystalhd.c')
-rw-r--r--libavcodec/crystalhd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/crystalhd.c b/libavcodec/crystalhd.c
index 8956ca4bfb..a22dfe16ea 100644
--- a/libavcodec/crystalhd.c
+++ b/libavcodec/crystalhd.c
@@ -537,14 +537,13 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
if (interlaced)
frame->top_field_first = !bottom_first;
- if (pkt_pts != AV_NOPTS_VALUE) {
- frame->pts = pkt_pts;
+ frame->pts = pkt_pts;
#if FF_API_PKT_PTS
FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = pkt_pts;
+ frame->pkt_pts = pkt_pts;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
- }
+
frame->pkt_pos = -1;
frame->pkt_duration = 0;
frame->pkt_size = -1;