diff options
author | Jai Menon <jmenon86@gmail.com> | 2010-01-28 15:45:21 +0000 |
---|---|---|
committer | Jai Menon <jmenon86@gmail.com> | 2010-01-28 15:45:21 +0000 |
commit | 90d0379f5eddc549c7e0a2ea3f2dcf4471c25c51 (patch) | |
tree | 1692688c9d512665ec7a022aefc2c36ae9b155f7 /libavdevice/v4l2.c | |
parent | 52ed8d0efeb5627ffdd64f44b97d1c8965f33cf1 (diff) | |
download | ffmpeg-90d0379f5eddc549c7e0a2ea3f2dcf4471c25c51.tar.gz |
Avoid using deprecated AVFormatParameters::[audio|video]_codec_id field.
Originally committed as revision 21511 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r-- | libavdevice/v4l2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index a9ffe3acd6..36c8d66c6b 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -552,7 +552,7 @@ static uint32_t device_try_init(AVFormatContext *s1, int *height, enum CodecID *codec_id) { - uint32_t desired_format = fmt_ff2v4l(ap->pix_fmt, ap->video_codec_id); + uint32_t desired_format = fmt_ff2v4l(ap->pix_fmt, s1->video_codec_id); if (desired_format == 0 || device_init(s1, width, height, desired_format) < 0) { @@ -560,8 +560,8 @@ static uint32_t device_try_init(AVFormatContext *s1, desired_format = 0; for (i = 0; i<FF_ARRAY_ELEMS(fmt_conversion_table); i++) { - if (ap->video_codec_id == CODEC_ID_NONE || - fmt_conversion_table[i].codec_id == ap->video_codec_id) { + if (s1->video_codec_id == CODEC_ID_NONE || + fmt_conversion_table[i].codec_id == s1->video_codec_id) { desired_format = fmt_conversion_table[i].v4l2_fmt; if (device_init(s1, width, height, desired_format) >= 0) { break; @@ -617,7 +617,7 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap) desired_format = device_try_init(s1, ap, &width, &height, &codec_id); if (desired_format == 0) { av_log(s1, AV_LOG_ERROR, "Cannot find a proper format for " - "codec_id %d, pix_fmt %d.\n", ap->video_codec_id, ap->pix_fmt); + "codec_id %d, pix_fmt %d.\n", s1->video_codec_id, ap->pix_fmt); close(s->fd); return AVERROR(EIO); |