summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-11 08:27:32 +0100
committerwm4 <wm4@nowhere>2017-01-11 08:27:32 +0100
commitc2c065913b9064111c24e4d2feb8763c22b288e3 (patch)
treeea818774db71e4550ac5529bc042749694682950
parentee66efeb99ef806ef6eb1ee854d68dbf19fdcb91 (diff)
downloadmpv-c2c065913b9064111c24e4d2feb8763c22b288e3.tar.bz2
mpv-c2c065913b9064111c24e4d2feb8763c22b288e3.tar.xz
vd_lavc: move end-of-probing code out of user notification if condition
Usually they happen at the same time, but conflating them is still a bit unclean and could possibly cause problems in the future. It's also really unnecessary.
-rw-r--r--video/decode/vd_lavc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 919fb9e2dd..1753bdedda 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -783,11 +783,13 @@ static struct mp_image *read_output(struct dec_video *vd, bool eof)
MP_INFO(vd, "Using software decoding.\n");
}
ctx->hwdec_notified = true;
+ }
- ctx->hw_probing = false;
+ if (ctx->hw_probing) {
for (int n = 0; n < ctx->num_sent_packets; n++)
talloc_free(ctx->sent_packets[n]);
ctx->num_sent_packets = 0;
+ ctx->hw_probing = false;
}
return res;