Commit ffb055fc authored by ramiro's avatar ramiro

Simplify more errors by using goto


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12819 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ee229a02
......@@ -308,8 +308,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
ret = SendMessage(ctx->hwnd, WM_CAP_GET_VIDEOFORMAT, bisize, (LPARAM) bi);
if(!ret) {
av_free(bi);
goto fail_io;
goto fail_bi;
}
dump_bih(s, &bi->bmiHeader);
......@@ -322,8 +321,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
ret = SendMessage(ctx->hwnd, WM_CAP_SET_VIDEOFORMAT, bisize, (LPARAM) bi);
if(!ret) {
av_log(s, AV_LOG_ERROR, "Could not set Video Format.\n");
av_free(bi);
goto fail_io;
goto fail_bi;
}
biCompression = bi->bmiHeader.biCompression;
......@@ -392,6 +390,9 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
return 0;
fail_bi:
av_free(bi);
fail_io:
vfw_read_close(s);
return AVERROR_IO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment