On date Wednesday 2011-05-25 16:27:35 +0200, Anton Khirnov encoded:
> ---
> libavdevice/v4l2.c | 15 +++++++++++----
> 1 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
> index 4e0b499..f829e50 100644
> --- a/libavdevice/v4l2.c
> +++ b/libavdevice/v4l2.c
> @@ -69,6 +69,7 @@ struct video_data {
> unsigned int *buf_len;
> char *standard;
> int channel;
> + char *pix_fmt;
> };
>
> struct buff_data {
> @@ -542,12 +543,12 @@ static int v4l2_set_parameters(AVFormatContext *s1,
> AVFormatParameters *ap)
> }
>
> static uint32_t device_try_init(AVFormatContext *s1,
> - const AVFormatParameters *ap,
> + enum PixelFormat pix_fmt,
> int *width,
> int *height,
> enum CodecID *codec_id)
> {
> - uint32_t desired_format = fmt_ff2v4l(ap->pix_fmt, s1->video_codec_id);
> + uint32_t desired_format = fmt_ff2v4l(pix_fmt, s1->video_codec_id);
>
> if (desired_format == 0 ||
> device_init(s1, width, height, desired_format) < 0) {
> @@ -580,6 +581,7 @@ static int v4l2_read_header(AVFormatContext *s1,
> AVFormatParameters *ap)
> int res;
> uint32_t desired_format, capabilities;
> enum CodecID codec_id;
> + enum PixelFormat pix_fmt = av_get_pix_fmt(s->pix_fmt);
Missing check.
--
QOTD:
How can I miss you if you won't go away?
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel