mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
Use new av_dict_set_int helper function.
Get rid of the many, slightly differing, implementations of basically the same thing. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
@@ -61,8 +61,7 @@ static int query_formats(AVFilterContext *ctx)
|
||||
}
|
||||
|
||||
#define SET_META(key, value) \
|
||||
snprintf(buf, sizeof(buf), "%d", value); \
|
||||
av_dict_set(metadata, key, buf, 0);
|
||||
av_dict_set_int(metadata, key, value, 0);
|
||||
|
||||
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||
{
|
||||
@@ -70,7 +69,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||
BBoxContext *bbox = ctx->priv;
|
||||
FFBoundingBox box;
|
||||
int has_bbox, w, h;
|
||||
char buf[32];
|
||||
|
||||
has_bbox =
|
||||
ff_calculate_bounding_box(&box,
|
||||
|
||||
@@ -113,8 +113,7 @@ static int config_input(AVFilterLink *inlink)
|
||||
}
|
||||
|
||||
#define SET_META(key, value) \
|
||||
snprintf(buf, sizeof(buf), "%d", value); \
|
||||
av_dict_set(metadata, key, buf, 0)
|
||||
av_dict_set_int(metadata, key, value, 0)
|
||||
|
||||
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||
{
|
||||
@@ -123,7 +122,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||
int bpp = s->max_pixsteps[0];
|
||||
int w, h, x, y, shrink_by;
|
||||
AVDictionary **metadata;
|
||||
char buf[32];
|
||||
|
||||
// ignore first 2 frames - they may be empty
|
||||
if (++s->frame_nb > 0) {
|
||||
|
||||
Reference in New Issue
Block a user