[FFmpeg-cvslog] r14647 - trunk/libavdevice/v4l2.c
stefano
subversion
Wed Aug 6 20:21:35 CEST 2008
Author: stefano
Date: Wed Aug 6 20:21:35 2008
New Revision: 14647
Log:
Distinguish the error reporting for the cases of wrong size and wrong
timebase in the video4linux2 v4l2_read_header() function.
Modified:
trunk/libavdevice/v4l2.c
Modified: trunk/libavdevice/v4l2.c
==============================================================================
--- trunk/libavdevice/v4l2.c (original)
+++ trunk/libavdevice/v4l2.c Wed Aug 6 20:21:35 2008
@@ -495,9 +495,12 @@ static int v4l2_read_header(AVFormatCont
int res, frame_rate, frame_rate_base;
uint32_t desired_format, capabilities;
- if (ap->width <= 0 || ap->height <= 0 || ap->time_base.den <= 0) {
- av_log(s1, AV_LOG_ERROR, "Missing/Wrong width, height or framerate\n");
-
+ if (ap->width <= 0 || ap->height <= 0) {
+ av_log(s1, AV_LOG_ERROR, "Wrong size (%dx%d)\n", ap->width, ap->height);
+ return -1;
+ }
+ if (ap->time_base.den <= 0) {
+ av_log(s1, AV_LOG_ERROR, "Wrong time base (%d)\n", ap->time_base.den);
return -1;
}
More information about the ffmpeg-cvslog
mailing list