diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2020-04-15 15:00:02 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2020-04-15 15:00:02 +0800 |
commit | 3c6432698e6e008c2e47940f8a8f971b6182c114 (patch) | |
tree | 46ca5ed7e35adfd624d546ef6647d642176af159 /ext | |
parent | 39e6f846e0e867185437925bf766a6ba10e6404f (diff) | |
download | gst-libav-3c6432698e6e008c2e47940f8a8f971b6182c114.tar.gz |
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)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/libav/gstavmux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/libav/gstavmux.c b/ext/libav/gstavmux.c index 65fee93..30c7047 100644 --- a/ext/libav/gstavmux.c +++ b/ext/libav/gstavmux.c @@ -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 */ |