On 26/02/2018 18:21, Vittorio Giovara wrote:
On Mon, Feb 26, 2018 at 12:10 AM, Luca Barbato <lu_z...@gentoo.org> wrote:
---
+
+ if (avctx->qmin > 0)
+ enccfg.rc_min_quantizer = avctx->qmin;
+ if (avctx->qmax > 0)
+ enccfg.rc_max_quantizer = avctx->qmax;
+
+#if FF_API_PRIVATE_OPT
+FF_DISABLE_DEPRECATION_WARNINGS
+ if (avctx->frame_skip_threshold)
+ ctx->drop_threshold = avctx->frame_skip_threshold;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+ enccfg.rc_dropframe_thresh = ctx->drop_threshold;
+
+static int storeframe(AVCodecContext *avctx, struct FrameListData
*cx_frame,
+ AVPacket *pkt)
+{
+ int ret = ff_alloc_packet(pkt, cx_frame->sz);
+ if (ret >= 0) {
+ memcpy(pkt->data, cx_frame->buf, pkt->size);
+ pkt->pts = pkt->dts = cx_frame->pts;
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
+ avctx->coded_frame->pts = cx_frame->pts;
+ avctx->coded_frame->key_frame = !!(cx_frame->flags &
AOM_FRAME_IS_KEY);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
+ if (!!(cx_frame->flags & AOM_FRAME_IS_KEY)) {
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+ pkt->flags |= AV_PKT_FLAG_KEY;
+ } else {
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
+ avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+ }
+ } else {
I don't think we should add deprecated code.
We have to if we want to keep compatibility.
lu
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel