avmux: avoid to use unintialized variable

Without this fix, running the command below will get an error randomly.

Example:
gst-launch-1.0 videotestsrc ! vp9enc ! avmux_ivf ! fakesink

ERROR: pipeline doesn't want to preroll.
0:00:02.388528491 30148 0x5601b424a370 ERROR                  libav :0::
Tag [1]V[0][0] incompatible with output codec id '167' (VP90)
This commit is contained in:
Haihao Xiang 2020-04-15 15:00:02 +08:00
parent 39e6f846e0
commit 3c6432698e

View file

@ -482,6 +482,7 @@ gst_ffmpegmux_setcaps (GstPad * pad, GstCaps * caps)
st = ffmpegmux->context->streams[collect_pad->padnum];
av_opt_set_int (ffmpegmux->context, "preload", ffmpegmux->preload, 0);
ffmpegmux->context->max_delay = ffmpegmux->max_delay;
memset (&tmp, 0, sizeof (tmp));
/* for the format-specific guesses, we'll go to
* our famous codec mapper */