Commit c13e490d authored by Michael Niedermayer's avatar Michael Niedermayer

codec_release_buffer: fix handling of non user buffers

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c17808ce
...@@ -1343,8 +1343,10 @@ void codec_release_buffer(AVCodecContext *s, AVFrame *frame) ...@@ -1343,8 +1343,10 @@ void codec_release_buffer(AVCodecContext *s, AVFrame *frame)
FrameBuffer *buf = frame->opaque; FrameBuffer *buf = frame->opaque;
int i; int i;
if(frame->type!=FF_BUFFER_TYPE_USER) if(frame->type!=FF_BUFFER_TYPE_USER) {
avcodec_default_release_buffer(s, frame); avcodec_default_release_buffer(s, frame);
return;
}
for (i = 0; i < FF_ARRAY_ELEMS(frame->data); i++) for (i = 0; i < FF_ARRAY_ELEMS(frame->data); i++)
frame->data[i] = NULL; frame->data[i] = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment