[FFmpeg-devel] libavformat and video4linux2 acquire problems
Thu May 10 03:53:52 CEST 2007
> >> If you provide a patch, and it does not break dv capturing or similar
> >> things, I'll be very happy to apply it.
> > Please review the attached patch
> Thanks. I'll have a look tonight, and I'll commit tomorrow.
> > I have check dv1394, it'll not break if standard is NULL and input is -1 case.
> Uhmm... I did not try, but I see this code in dv1394.c:
> if (ap->standard && !strcasecmp(ap->standard, "pal"))
> dv->format = DV1394_PAL;
> dv->format = DV1394_NTSC;
> if (ap->channel)
> dv->channel = ap->channel;
> dv->channel = DV1394_DEFAULT_CHANNEL;
> So, standard==NULL should not be a problem (unless strcasecmp() crashes
> if the first parameter is NULL --- I'll check that), but channel == -1
> can be a problem, because dv->channel will be set to -1 instead of
> DV1394_DEFAULT_CHANNEL. But I do not know what this would imply...
> So, maybe the safest thing is to remove the "video_channel = -1" part
> from your patch... I'll think about it later.
Oh, yes, maybe fix by below way, at least, it'll work as the same of the old way.
- if (ap->channel)
+ if (ap->channel>=0)
dv->channel = ap->channel;
More information about the ffmpeg-devel