goto fail;
}
- /* no values set, autodetect them */
- if (s->video_win.width <= 0 || s->video_win.height <= 0) {
- if (ioctl(video_fd, VIDIOCGWIN, &s->video_win, sizeof(s->video_win)) < 0) {
- av_log(s1, AV_LOG_ERROR, "VIDIOCGWIN: %s\n", strerror(errno));
- goto fail;
- }
- }
-
if (ioctl(video_fd, VIDIOCGCAP, &s->video_cap) < 0) {
av_log(s1, AV_LOG_ERROR, "VIDIOCGCAP: %s\n", strerror(errno));
goto fail;
goto fail;
}
+ /* no values set, autodetect them */
+ if (s->video_win.width <= 0 || s->video_win.height <= 0) {
+ if (ioctl(video_fd, VIDIOCGWIN, &s->video_win, sizeof(s->video_win)) < 0) {
+ av_log(s1, AV_LOG_ERROR, "VIDIOCGWIN: %s\n", strerror(errno));
+ goto fail;
+ }
+ }
+
desired_palette = -1;
desired_depth = -1;
for (j = 0; j < vformat_num; j++) {