player, ta: remove use of an old macro

I thought that would make a nice idiom, but it ended up being useless or
clunky.
This commit is contained in:
wm4 2020-04-10 23:12:41 +02:00
parent e796fe4bfc
commit 835137a0e5
2 changed files with 1 additions and 4 deletions

View File

@ -264,7 +264,7 @@ struct MPContext *mp_create(void)
.last_chapter = -2, .last_chapter = -2,
.term_osd_contents = talloc_strdup(mpctx, ""), .term_osd_contents = talloc_strdup(mpctx, ""),
.osd_progbar = { .type = -1 }, .osd_progbar = { .type = -1 },
.playlist = talloc_struct(mpctx, struct playlist, {0}), .playlist = talloc_zero(mpctx, struct playlist),
.dispatch = mp_dispatch_create(mpctx), .dispatch = mp_dispatch_create(mpctx),
.playback_abort = mp_cancel_new(mpctx), .playback_abort = mp_cancel_new(mpctx),
.thread_pool = mp_thread_pool_create(mpctx, 0, 1, 30), .thread_pool = mp_thread_pool_create(mpctx, 0, 1, 30),

View File

@ -156,7 +156,4 @@ char *ta_talloc_asprintf_append_buffer(char *s, const char *fmt, ...) TA_PRF(2,
: false \ : false \
) )
#define talloc_struct(ctx, type, ...) \
talloc_memdup(ctx, &(type) TA_EXPAND_ARGS(__VA_ARGS__), sizeof(type))
#endif #endif