From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 6/6] lavu/frame: deprecate AVFrame.pkt_{pos, size}
Date: Fri, 10 Mar 2023 09:18:24 -0300
Message-ID: <38e8f429-9da3-fe23-7514-e9d6aa7f32bf@gmail.com> (raw)
In-Reply-To: <20230310115635.13639-6-anton@khirnov.net>
On 3/10/2023 8:56 AM, Anton Khirnov wrote:
> diff --git a/libavcodec/decode.c b/libavcodec/decode.c
> index d1ba7f167f..ed937a3055 100644
> --- a/libavcodec/decode.c
> +++ b/libavcodec/decode.c
> @@ -287,8 +287,12 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
> if (!(codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
> frame->pkt_dts = pkt->dts;
> if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
> +#if FF_API_FRAME_PKT
> +FF_DISABLE_DEPRECATION_WARNINGS
> if(!avctx->has_b_frames)
> frame->pkt_pos = pkt->pos;
> +FF_ENABLE_DEPRECATION_WARNINGS
> +#endif
> //FIXME these should be under if(!avctx->has_b_frames)
> /* get_buffer is supposed to set frame parameters */
> if (!(avctx->codec->capabilities & AV_CODEC_CAP_DR1)) {
> @@ -1312,9 +1316,13 @@ int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx,
> };
>
> frame->pts = pkt->pts;
> - frame->pkt_pos = pkt->pos;
> frame->duration = pkt->duration;
> +#if FF_API_FRAME_PKT
> +FF_DISABLE_DEPRECATION_WARNINGS
> + frame->pkt_pos = pkt->pos;
> frame->pkt_size = pkt->size;
> +FF_ENABLE_DEPRECATION_WARNINGS
> +#endif
>
> for (int i = 0; i < FF_ARRAY_ELEMS(sd); i++) {
> size_t size;
> @@ -1355,7 +1363,11 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
> int ret = ff_decode_frame_props_from_pkt(avctx, frame, pkt);
> if (ret < 0)
> return ret;
> +#if FF_API_FRAME_PKT
> +FF_DISABLE_DEPRECATION_WARNINGS
> frame->pkt_size = pkt->stream_index;
The only remaining use of last_pkt_props->stream_index is in
decode_simple_internal() where it subtracts the amount of bytes consumed
from it, so maybe it should be wrapped too?
> +FF_ENABLE_DEPRECATION_WARNINGS
> +#endif
> }
> #if FF_API_REORDERED_OPAQUE
> FF_DISABLE_DEPRECATION_WARNINGS
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-03-10 12:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 11:56 [FFmpeg-devel] [PATCH 1/6] lavc/decode: stop mangling last_pkt_props->opaque Anton Khirnov
2023-03-10 11:56 ` [FFmpeg-devel] [PATCH 2/6] fftools/ffprobe: stop using AVFrame.pkt_{pos, size} Anton Khirnov
2023-03-12 15:04 ` Stefano Sabatini
2023-03-10 11:56 ` [FFmpeg-devel] [PATCH 3/6] fftools/ffplay: drop an unused function argument Anton Khirnov
2023-03-12 15:05 ` Stefano Sabatini
2023-03-10 11:56 ` [FFmpeg-devel] [PATCH 4/6] fftools/ffplay: depend on avfilter Anton Khirnov
2023-03-10 11:56 ` [FFmpeg-devel] [PATCH 5/6] fftools/ffplay: stop using AVFrame.pkt_pos Anton Khirnov
2023-03-13 20:44 ` Marton Balint
2023-03-15 14:18 ` [FFmpeg-devel] [PATCH v2 4/5] " Anton Khirnov
2023-03-10 11:56 ` [FFmpeg-devel] [PATCH 6/6] lavu/frame: deprecate AVFrame.pkt_{pos, size} Anton Khirnov
2023-03-10 12:18 ` James Almer [this message]
2023-03-11 10:54 ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2023-03-14 23:00 ` Michael Niedermayer
2023-03-15 15:03 ` Anton Khirnov
2023-03-10 12:11 ` [FFmpeg-devel] [PATCH 1/6] lavc/decode: stop mangling last_pkt_props->opaque Anton Khirnov
2023-03-10 12:39 ` Martin Storsjö
2023-03-11 10:51 ` Anton Khirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38e8f429-9da3-fe23-7514-e9d6aa7f32bf@gmail.com \
--to=jamrial@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git