diff options
author | wm4 <wm4@nowhere> | 2013-11-23 21:39:07 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-23 21:39:07 +0100 |
commit | 4c2fb8f3a2dbe4d9411007f169326d646943d216 (patch) | |
tree | b623eeadcbb32ca7c8f7ba64e7d18d39dd9723b3 /video/decode/vd_lavc.c | |
parent | 02f96efc509021d3dccea635044580199ddd0665 (diff) | |
download | mpv-4c2fb8f3a2dbe4d9411007f169326d646943d216.tar.bz2 mpv-4c2fb8f3a2dbe4d9411007f169326d646943d216.tar.xz |
dec_video: make vf_input and hwdec_info statically allocated
The only reason why these structs were dynamically allocated was to
avoid recursive includes in stheader.h, which is (or was) a very central
file included by almost all other files. (If a struct is referenced via
a pointer type only, it can be forward referenced, and the definition of
the struct is not needed.) Now that they're out of stheader.h, this
difference doesn't matter anymore, and the code can be simplified.
Also sneak in some sanity checks.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 37c94fa881..332de553a6 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -224,7 +224,7 @@ static bool probe_hwdec(struct dec_video *vd, bool autoprobe, enum hwdec_type ap return false; } const char *hw_decoder = NULL; - int r = hwdec_probe(hwdec, vd->hwdec_info, decoder, &hw_decoder); + int r = hwdec_probe(hwdec, &vd->hwdec_info, decoder, &hw_decoder); if (r >= 0) { *use_hwdec = hwdec; *use_decoder = hw_decoder; @@ -380,7 +380,7 @@ static void init_avctx(struct dec_video *vd, const char *decoder, if (!lavc_codec) return; - ctx->hwdec_info = vd->hwdec_info; + ctx->hwdec_info = &vd->hwdec_info; ctx->do_dr1 = ctx->do_hw_dr1 = 0; ctx->pix_fmt = PIX_FMT_NONE; |