Fix potential uninitialized variable

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

If this was true, the 'ret' variable would be used without
initialization.
This commit is contained in:
jp9000
2014-03-11 16:07:22 -07:00
parent 6578c8b03e
commit 74a3dfcf69

View File

@@ -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);