From: Yukinori Yamazoe <[email protected]>
Signed-off-by: Luca Barbato <[email protected]>
---
I didn't changed it when I changed the sematics of ref/unref, thanks
for noticing (I guess the patch could me moved closer to mpeg2)
libavcodec/qsv.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 81c07df..1563031 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -276,22 +276,23 @@ int ff_qsv_decode(AVCodecContext *avctx, QSVContext *q,
mfxSyncPoint sync;
int ret, i = 0;
int size = avpkt->size;
+ AVPacket pkt;
*got_frame = 0;
ff_packet_list_put(&q->pending, &q->pending_end, avpkt);
if (!q->wait) {
- ff_packet_list_get(&q->pending, &q->pending_end, avpkt);
+ ff_packet_list_get(&q->pending, &q->pending_end, &pkt);
- if ((ret = put_dts(q, avpkt->pts, avpkt->dts)) < 0)
+ if ((ret = put_dts(q, pkt.pts, pkt.dts)) < 0)
return ret;
- q->bs.TimeStamp = avpkt->pts;
+ q->bs.TimeStamp = pkt.pts;
- ret = bitstream_enqueue(&q->bs, avpkt->data, avpkt->size);
+ ret = bitstream_enqueue(&q->bs, pkt.data, pkt.size);
- av_packet_unref(avpkt);
+ av_packet_unref(&pkt);
if (ret < 0)
return ret;
--
1.8.3.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel