Commit 022553e8 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '387bef95'

* commit '387bef95':
  lavc: factorise setting buffer type in avcodec_default_get_buffer().
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 83db6cb5 387bef95
......@@ -362,8 +362,6 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
return ret;
}
frame->type = FF_BUFFER_TYPE_INTERNAL;
avci->audio_data = frame->data[0];
if (avctx->debug & FF_DEBUG_BUFFERS)
av_log(avctx, AV_LOG_DEBUG, "default_get_buffer called on frame %p, "
......@@ -478,7 +476,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
buf->height = s->height;
buf->pix_fmt = s->pix_fmt;
}
pic->type = FF_BUFFER_TYPE_INTERNAL;
for (i = 0; i < AV_NUM_DATA_POINTERS; i++) {
pic->base[i] = buf->base[i];
......@@ -497,6 +494,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
{
frame->type = FF_BUFFER_TYPE_INTERNAL;
switch (avctx->codec_type) {
case AVMEDIA_TYPE_VIDEO:
return video_get_buffer(avctx, frame);
......
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