aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegpicture.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-26 17:26:56 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-29 19:30:25 +0100
commitd0ceb90f44ff342e8de8259548a04fb9fce2ed68 (patch)
tree7feaec53a2b9f35d6ad92fc1da40caf4bfe4fafb /libavcodec/mpegpicture.c
parentdcdb34be9121adf0cf499d75b84a3ba242a872d4 (diff)
downloadffmpeg-d0ceb90f44ff342e8de8259548a04fb9fce2ed68.tar.gz
avcodec/mpegpicture: Let ff_mpeg_unref_picture() free picture tables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegpicture.c')
-rw-r--r--libavcodec/mpegpicture.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index 0652b7c879..f78a3c23e3 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -290,7 +290,8 @@ fail:
}
/**
- * Deallocate a picture.
+ * Deallocate a picture; frees the picture tables in case they
+ * need to be reallocated anyway.
*/
void ff_mpeg_unref_picture(AVCodecContext *avctx, Picture *pic)
{
@@ -443,8 +444,6 @@ int ff_find_unused_picture(AVCodecContext *avctx, Picture *picture, int shared)
if (ret >= 0 && ret < MAX_PICTURE_COUNT) {
if (picture[ret].needs_realloc) {
- picture[ret].needs_realloc = 0;
- ff_free_picture_tables(&picture[ret]);
ff_mpeg_unref_picture(avctx, &picture[ret]);
}
}