summaryrefslogtreecommitdiff
path: root/libavfilter/avcodec.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-06-19 01:14:32 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-06-19 16:44:35 +0200
commit8f8d8b953836a42bc7fdf7dc52418cb5c63f56ba (patch)
tree0675ece8cc07cb208464eb81172cb10560e3424e /libavfilter/avcodec.c
parentd5761fe47d7dd8f02f7ded0afdae54512e09fd9f (diff)
downloadffmpeg-8f8d8b953836a42bc7fdf7dc52418cb5c63f56ba.tar.gz
lavfi/avcodec: always use av_frame* accessors in avfilter_copy_buf_props()
Use av_frame_* accessors for the newly added fields in AVFrame (for which we are supposed to use such accessors), and group the istructions accordingly.
Diffstat (limited to 'libavfilter/avcodec.c')
-rw-r--r--libavfilter/avcodec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index d6cd4d1f9d..aa9833444f 100644
--- a/libavfilter/avcodec.c
+++ b/libavfilter/avcodec.c
@@ -93,8 +93,8 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)
memcpy(dst->linesize, src->linesize, sizeof(dst->linesize));
dst->pts = src->pts;
- dst->pkt_pos = src->pos;
dst->format = src->format;
+ av_frame_set_pkt_pos(dst, src->pos);
switch (src->type) {
case AVMEDIA_TYPE_VIDEO:
@@ -120,10 +120,9 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)
planes * sizeof(dst->extended_data));
} else
dst->extended_data = dst->data;
-
- dst->sample_rate = src->audio->sample_rate;
- dst->channel_layout = src->audio->channel_layout;
dst->nb_samples = src->audio->nb_samples;
+ av_frame_set_sample_rate (dst, src->audio->sample_rate);
+ av_frame_set_channel_layout(dst, src->audio->channel_layout);
break;
default:
return AVERROR(EINVAL);