Fix segfault when using non lavc codecs: when closing a video file guvcview would try to access lavc_data struct to flush the remaining frames in the encoder, but lavc_data is NULL for non lavc codecs, thus causing a segfault, fix it by adding a check for NULL