mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Call release_buffer on close for v210dec and v210x
Originally committed as revision 20228 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4b5fee0205
commit
0fbb0185b9
@ -114,6 +114,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
|
||||
static av_cold int decode_close(AVCodecContext *avctx)
|
||||
{
|
||||
AVFrame *pic = avctx->coded_frame;
|
||||
if (pic->data[0])
|
||||
avctx->release_buffer(avctx, pic);
|
||||
av_freep(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
|
@ -124,6 +124,16 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
return avpkt->size;
|
||||
}
|
||||
|
||||
static av_cold int decode_close(AVCodecContext *avctx)
|
||||
{
|
||||
AVFrame *pic = avctx->coded_frame;
|
||||
if (pic->data[0])
|
||||
avctx->release_buffer(avctx, pic);
|
||||
av_freep(&avctx->coded_frame);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AVCodec v210x_decoder = {
|
||||
"v210x",
|
||||
CODEC_TYPE_VIDEO,
|
||||
@ -131,7 +141,7 @@ AVCodec v210x_decoder = {
|
||||
0,
|
||||
decode_init,
|
||||
NULL,
|
||||
NULL,
|
||||
decode_close,
|
||||
decode_frame,
|
||||
CODEC_CAP_DR1,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user