aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-22 15:48:11 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-22 15:48:11 +0200
commit2fece1e4d5ee180576617eeb41ba4615c2e97729 (patch)
tree367552b475b4f9631e3aaeffd29153b867c9bebe
parent760dbdd3c56150a4dc5a4c5812e07c2bd759b934 (diff)
parentf6f32fc93d39caf329869c1bff8ad024ccab1d42 (diff)
downloadffmpeg-2fece1e4d5ee180576617eeb41ba4615c2e97729.tar.gz
Merge commit 'f6f32fc93d39caf329869c1bff8ad024ccab1d42'
* commit 'f6f32fc93d39caf329869c1bff8ad024ccab1d42': qsvenc: set the timestamp for PIX_FMT_QSV frames as well Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r--libavcodec/qsvenc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 7189ac4080..ea148a388b 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -385,10 +385,7 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame,
return ret;
qf->surface = (mfxFrameSurface1*)qf->frame->data[3];
- *surface = qf->surface;
- return 0;
- }
-
+ } else {
/* make a copy if the input is not padded as libmfx requires */
if ( frame->height & (q->height_align - 1) ||
frame->linesize[0] & (q->width_align - 1)) {
@@ -428,9 +425,11 @@ static int submit_frame(QSVEncContext *q, const AVFrame *frame,
qf->surface_internal.Data.PitchLow = qf->frame->linesize[0];
qf->surface_internal.Data.Y = qf->frame->data[0];
qf->surface_internal.Data.UV = qf->frame->data[1];
- qf->surface_internal.Data.TimeStamp = av_rescale_q(frame->pts, q->avctx->time_base, (AVRational){1, 90000});
qf->surface = &qf->surface_internal;
+ }
+
+ qf->surface->Data.TimeStamp = av_rescale_q(frame->pts, q->avctx->time_base, (AVRational){1, 90000});
*surface = qf->surface;