avfilter: do not use AVFrame accessor

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
This commit is contained in:
Muhammad Faiz
2017-04-22 15:57:18 +07:00
parent 8103c59522
commit 6af050d7d0
52 changed files with 80 additions and 80 deletions

View File

@@ -53,7 +53,7 @@ void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
"ref[%p buf:%p data:%p linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64,
ref, ref->buf, ref->data[0],
ref->linesize[0], ref->linesize[1], ref->linesize[2], ref->linesize[3],
ref->pts, av_frame_get_pkt_pos(ref));
ref->pts, ref->pkt_pos);
if (ref->width) {
ff_tlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
@@ -1143,7 +1143,7 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
av_log(link->dst, AV_LOG_ERROR, "Format change is not supported\n");
goto error;
}
if (av_frame_get_channels(frame) != link->channels) {
if (frame->channels != link->channels) {
av_log(link->dst, AV_LOG_ERROR, "Channel count change is not supported\n");
goto error;
}
@@ -1585,7 +1585,7 @@ int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe)
case AVMEDIA_TYPE_AUDIO:
av_samples_copy(out->extended_data, frame->extended_data,
0, 0, frame->nb_samples,
av_frame_get_channels(frame),
frame->channels,
frame->format);
break;
default:
@@ -1616,7 +1616,7 @@ int ff_inlink_evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *fram
{
AVFilterContext *dstctx = link->dst;
int64_t pts = frame->pts;
int64_t pos = av_frame_get_pkt_pos(frame);
int64_t pos = frame->pkt_pos;
if (!dstctx->enable_str)
return 1;