X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fvdevicev4l2.C;h=c2ca9e97bb4df6b057253759d1830a1bd93ee094;hb=6c0c8bd0e577001d1cc18c6c27d58e62f58a6bff;hp=49c233405adc285353624e2853358b2a9b66530f;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/vdevicev4l2.C b/cinelerra-5.0/cinelerra/vdevicev4l2.C index 49c23340..c2ca9e97 100644 --- a/cinelerra-5.0/cinelerra/vdevicev4l2.C +++ b/cinelerra-5.0/cinelerra/vdevicev4l2.C @@ -52,8 +52,15 @@ int VDeviceV4L2::open_input() int result = get_sources(); if( !result ) { - device->channel->use_frequency = 1; - device->channel->use_fine = 1; + ArrayList *inputs = device->get_inputs(); + for( int i=0; isize(); ++i ) { + if( inputs->get(i)->tuner ) { + device->channel->use_frequency = 1; + device->channel->use_fine = 1; + } + else + device->channel->use_input = 1; + } } return result; } @@ -99,7 +106,7 @@ int VDeviceV4L2::read_buffer(VFrame *frame) VFrame *buffer = device_buffer(bfr); //printf("VDeviceV4L2::read_buffer %d %p %p\n", // __LINE__, frame->get_data(), buffer->get_data()); - frame->copy_from(buffer); + frame->transfer_from(buffer); put_buffer(bfr); } else