aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pthread_frame.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-02-20 19:47:51 +0100
committerAnton Khirnov <anton@khirnov.net>2023-03-02 21:32:00 +0100
commit432adca5fedcb277b9a715a723cfd40735ec58f8 (patch)
tree68bf173c1fce8c1b2255344f2daa605e59d2ba27 /libavcodec/pthread_frame.c
parent79b40ff58c2e6f59d7a5e6d289243a10ff1dccb4 (diff)
downloadffmpeg-432adca5fedcb277b9a715a723cfd40735ec58f8.tar.gz
lavc: disable an obsolete hack for real video
AVCodecContext.slice_{count,offset} are unneeded since 2007, commit 383b123ed37df4ff99010646f1fa5911ff1428cc and following. Deprecate those fields.
Diffstat (limited to 'libavcodec/pthread_frame.c')
-rw-r--r--libavcodec/pthread_frame.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 31785acbef..74864e19c5 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -374,6 +374,8 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
+#if FF_API_SLICE_OFFSET
+FF_DISABLE_DEPRECATION_WARNINGS
if (src->slice_count && src->slice_offset) {
if (dst->slice_count < src->slice_count) {
int err = av_reallocp_array(&dst->slice_offset, src->slice_count,
@@ -385,6 +387,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
src->slice_count * sizeof(*dst->slice_offset));
}
dst->slice_count = src->slice_count;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
av_packet_unref(dst->internal->last_pkt_props);
err = av_packet_copy_props(dst->internal->last_pkt_props, src->internal->last_pkt_props);
@@ -686,7 +690,11 @@ void ff_frame_thread_free(AVCodecContext *avctx, int thread_count)
av_freep(&ctx->priv_data);
}
+#if FF_API_SLICE_OFFSET
+FF_DISABLE_DEPRECATION_WARNINGS
av_freep(&ctx->slice_offset);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
av_buffer_unref(&ctx->internal->pool);
av_packet_free(&ctx->internal->last_pkt_props);