[Ffmpeg-devel] compressed v4l2 images

Luca Abeni lucabe72
Sun Feb 11 18:24:42 CET 2007


Hi Michael,

On Sat, 2007-02-10 at 17:23 +0100, Michael Niedermayer wrote:
[...]
> > +    if ((*width != fmt.fmt.pix.width) || (*height != fmt.fmt.pix.height)) {
> > +        av_log(NULL, AV_LOG_INFO, "The V4L2 driver changed the video from %dx%d to %dx%d\n", *width, *height, fmt.fmt.pix.width, fmt.fmt.pix.height);
> 
> please provide a context to av_log (AVFormatContxt will do), i dont want to
> see to many new av_log(NULL, ...) they cause problems in multithreded
> apps
Tomorrow I'll fix v4l2.c to pass proper contexts to av_log() as much as
possibile, and I'll update this patch in a similar way.

[...]
> > +    /* Image is at s->buff_start[buf.index] */
> > +    memcpy(pkt->data, s->buf_start[buf.index], buf.bytesused);
> 
> can that memcpy be avoided? (directly grabing into AVPacket.data)?
I had a patch for doing something similar, but the patch had some
problems (I do not remember right now). I'll search for it in the next
days.


				Luca





More information about the ffmpeg-devel mailing list