mirror of https://git.ffmpeg.org/ffmpeg.git
ffmpeg: Initialize two stack variables.
Avoids reading from uninitialized memory, regression since af1761f7
This commit is contained in:
parent
66963d4b8d
commit
4b192ffdbe
4
ffmpeg.c
4
ffmpeg.c
|
@ -1434,7 +1434,7 @@ static int reap_filters(int flush)
|
||||||
filter = ost->filter->filter;
|
filter = ost->filter->filter;
|
||||||
|
|
||||||
if (!ost->initialized) {
|
if (!ost->initialized) {
|
||||||
char error[1024];
|
char error[1024] = "";
|
||||||
ret = init_output_stream(ost, error, sizeof(error));
|
ret = init_output_stream(ost, error, sizeof(error));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Error initializing output stream %d:%d -- %s\n",
|
av_log(NULL, AV_LOG_ERROR, "Error initializing output stream %d:%d -- %s\n",
|
||||||
|
@ -1847,7 +1847,7 @@ static void flush_encoders(void)
|
||||||
// Maybe we should just let encoding fail instead.
|
// Maybe we should just let encoding fail instead.
|
||||||
if (!ost->initialized) {
|
if (!ost->initialized) {
|
||||||
FilterGraph *fg = ost->filter->graph;
|
FilterGraph *fg = ost->filter->graph;
|
||||||
char error[1024];
|
char error[1024] = "";
|
||||||
|
|
||||||
av_log(NULL, AV_LOG_WARNING,
|
av_log(NULL, AV_LOG_WARNING,
|
||||||
"Finishing stream %d:%d without any data written to it.\n",
|
"Finishing stream %d:%d without any data written to it.\n",
|
||||||
|
|
Loading…
Reference in New Issue