mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mpegpicture: Let ff_mpeg_unref_picture() free picture tables
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
dcdb34be91
commit
d0ceb90f44
|
@ -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)
|
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 (ret >= 0 && ret < MAX_PICTURE_COUNT) {
|
||||||
if (picture[ret].needs_realloc) {
|
if (picture[ret].needs_realloc) {
|
||||||
picture[ret].needs_realloc = 0;
|
|
||||||
ff_free_picture_tables(&picture[ret]);
|
|
||||||
ff_mpeg_unref_picture(avctx, &picture[ret]);
|
ff_mpeg_unref_picture(avctx, &picture[ret]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue