summaryrefslogtreecommitdiffstats
path: root/libavfilter/f_select.c
diff options
context:
space:
mode:
authorMuhammad Faiz <mfcc64@gmail.com>2017-04-22 15:57:18 +0700
committerMuhammad Faiz <mfcc64@gmail.com>2017-04-23 14:40:30 +0700
commit6af050d7d0c3c73f3d62115152db82ebd2dc5d57 (patch)
treed1c7b6d4711dc095cab3f135f5c6433b4474364a /libavfilter/f_select.c
parent8103c595223613c08e44bcf56ae7098d3c31be8b (diff)
downloadffmpeg-streaming-6af050d7d0c3c73f3d62115152db82ebd2dc5d57.zip
ffmpeg-streaming-6af050d7d0c3c73f3d62115152db82ebd2dc5d57.tar.gz
avfilter: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'libavfilter/f_select.c')
-rw-r--r--libavfilter/f_select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index 03c1c0f..c860262 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -284,7 +284,7 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame *frame)
static double get_concatdec_select(AVFrame *frame, int64_t pts)
{
- AVDictionary *metadata = av_frame_get_metadata(frame);
+ AVDictionary *metadata = frame->metadata;
AVDictionaryEntry *start_time_entry = av_dict_get(metadata, "lavf.concatdec.start_time", NULL, 0);
AVDictionaryEntry *duration_entry = av_dict_get(metadata, "lavf.concatdec.duration", NULL, 0);
if (start_time_entry) {
@@ -321,7 +321,7 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame)
select->var_values[VAR_N ] = inlink->frame_count_out;
select->var_values[VAR_PTS] = TS2D(frame->pts);
select->var_values[VAR_T ] = TS2D(frame->pts) * av_q2d(inlink->time_base);
- select->var_values[VAR_POS] = av_frame_get_pkt_pos(frame) == -1 ? NAN : av_frame_get_pkt_pos(frame);
+ select->var_values[VAR_POS] = frame->pkt_pos == -1 ? NAN : frame->pkt_pos;
select->var_values[VAR_KEY] = frame->key_frame;
select->var_values[VAR_CONCATDEC_SELECT] = get_concatdec_select(frame, av_rescale_q(frame->pts, inlink->time_base, AV_TIME_BASE_Q));
@@ -340,7 +340,7 @@ static void select_frame(AVFilterContext *ctx, AVFrame *frame)
select->var_values[VAR_SCENE] = get_scene_score(ctx, frame);
// TODO: document metadata
snprintf(buf, sizeof(buf), "%f", select->var_values[VAR_SCENE]);
- av_dict_set(avpriv_frame_get_metadatap(frame), "lavfi.scene_score", buf, 0);
+ av_dict_set(&frame->metadata, "lavfi.scene_score", buf, 0);
}
break;
}
OpenPOWER on IntegriCloud