aboutsummaryrefslogtreecommitdiff
path: root/libavdevice/bktr.c
diff options
context:
space:
mode:
authorMichael Niedermayer2011-06-24 02:54:12 +0200
committerMichael Niedermayer2011-06-24 03:07:04 +0200
commit686959e87e377c0494da636640e36779dd985c30 (patch)
tree8c4674c56f291638686e6bc3efafe0ef2b921327 /libavdevice/bktr.c
parentffc6c8a4305d25db8a5af72389a2453b17f43646 (diff)
parentadbfc605f6bbe87b292c82cd1f5d4d974fa6b73c (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: doxygen: Consistently use '@' instead of '\' for Doxygen markup. Use av_printf_format to check the usage of printf style functions Add av_printf_format, for marking printf style format strings and their parameters ARM: enable thumb for Cortex-M* CPUs nsvdec: Propagate error values instead of returning 0 in nsv_read_header(). build: remove SRC_PATH_BARE variable build: move basic rules and variables to main Makefile build: move special targets to end of main Makefile lavdev: improve feedback in case of invalid frame rate/size vfwcap: prefer "framerate_q" over "fps" in vfw_read_header() v4l2: prefer "framerate_q" over "fps" in v4l2_set_parameters() fbdev: prefer "framerate_q" over "fps" in device context bktr: prefer "framerate" over "fps" for grab_read_header() ALSA: implement channel layout for playback. alsa: support unsigned variants of already supported signed formats. alsa: add support for more formats. ARM: allow building in Thumb2 mode Conflicts: common.mak doc/APIchanges libavcodec/vdpau.h libavdevice/alsa-audio-common.c libavdevice/fbdev.c libavdevice/libdc1394.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/bktr.c')
-rw-r--r--libavdevice/bktr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index f6216e0aa3..9c1afe518b 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -248,7 +248,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
VideoData *s = s1->priv_data;
AVStream *st;
int width, height;
- AVRational fps;
+ AVRational framerate;
int ret = 0;
#if FF_API_FORMAT_PARAMETERS
@@ -263,7 +263,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
#endif
if ((ret = av_parse_video_size(&width, &height, s->video_size)) < 0) {
- av_log(s1, AV_LOG_ERROR, "Couldn't parse video size.\n");
+ av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n", s->video_size);
goto out;
}
@@ -277,8 +277,8 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
ret = AVERROR(EINVAL);
goto out;
}
- if ((ret = av_parse_video_rate(&fps, s->framerate)) < 0) {
- av_log(s1, AV_LOG_ERROR, "Couldn't parse framerate.\n");
+ if ((ret = av_parse_video_rate(&framerate, s->framerate)) < 0) {
+ av_log(s1, AV_LOG_ERROR, "Could not parse framerate '%s'.\n", s->framerate);
goto out;
}
#if FF_API_FORMAT_PARAMETERS
@@ -287,7 +287,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
if (ap->height > 0)
height = ap->height;
if (ap->time_base.num)
- fps = (AVRational){ap->time_base.den, ap->time_base.num};
+ framerate = (AVRational){ap->time_base.den, ap->time_base.num};
#endif
st = av_new_stream(s1, 0);
@@ -299,15 +299,15 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
s->width = width;
s->height = height;
- s->per_frame = ((uint64_t)1000000 * fps.den) / fps.num;
+ s->per_frame = ((uint64_t)1000000 * framerate.den) / framerate.num;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->pix_fmt = PIX_FMT_YUV420P;
st->codec->codec_id = CODEC_ID_RAWVIDEO;
st->codec->width = width;
st->codec->height = height;
- st->codec->time_base.den = fps.num;
- st->codec->time_base.num = fps.den;
+ st->codec->time_base.den = framerate.num;
+ st->codec->time_base.num = framerate.den;
if (bktr_init(s1->filename, width, height, s->standard,