浏览代码

Fix potential uninitialized variable

if (data->output->flags & AVFMT_RAWPICTURE)

If this was true, the 'ret' variable would be used without
initialization.
jp9000 11 年之前
父节点
当前提交
74a3dfcf69
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/obs-ffmpeg/obs-ffmpeg-output.c

+ 1 - 1
plugins/obs-ffmpeg/obs-ffmpeg-output.c

@@ -519,7 +519,7 @@ static void receive_video(void *param, const struct video_data *frame)
 	struct ffmpeg_data   *data   = &output->ff_data;
 	AVCodecContext *context = data->video->codec;
 	AVPacket packet = {0};
-	int ret, got_packet;
+	int ret = 0, got_packet;
 
 	av_init_packet(&packet);