diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-05 17:02:36 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-05 17:02:42 +0100 |
commit | 022553e875094565417d32b82975f56be8384820 (patch) | |
tree | 4793301de5e9decc89e0ed3fd8ddb52bae3f0386 /libavcodec/utils.c | |
parent | 83db6cb521c699bec23e542b8fd24a3afc0dfc60 (diff) | |
parent | 387bef95d28019c13c6805cfa4079e59948284e5 (diff) | |
download | ffmpeg-streaming-022553e875094565417d32b82975f56be8384820.zip ffmpeg-streaming-022553e875094565417d32b82975f56be8384820.tar.gz |
Merge commit '387bef95d28019c13c6805cfa4079e59948284e5'
* commit '387bef95d28019c13c6805cfa4079e59948284e5':
lavc: factorise setting buffer type in avcodec_default_get_buffer().
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index ab96a06..7a51865 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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); |