diff --git a/src/zm_ffmpeg_camera.cpp b/src/zm_ffmpeg_camera.cpp index 8db581c72..cbe128b11 100644 --- a/src/zm_ffmpeg_camera.cpp +++ b/src/zm_ffmpeg_camera.cpp @@ -121,11 +121,11 @@ int FfmpegCamera::PrimeCapture() // Handle options AVDictionary *opts = 0; StringVector opVect = split(Options(), ","); - for (int i=0; i 1) - av_dict_set(&opts, trimSpaces(parts[0]), trimSpaces(parts[1])); + av_dict_set(&opts, trimSpaces(parts[0]).c_str(), trimSpaces(parts[1]).c_str(), 0); } if ( avformat_open_input( &mFormatContext, mPath.c_str(), NULL, &opts ) !=0 ) #endif diff --git a/src/zm_libvlc_camera.cpp b/src/zm_libvlc_camera.cpp index f127fe3a0..f88009311 100644 --- a/src/zm_libvlc_camera.cpp +++ b/src/zm_libvlc_camera.cpp @@ -147,12 +147,15 @@ int LibvlcCamera::PrimeCapture() if (opVect.size() > 0) { - mOptArgV = new char*[opVect.size()];cmd - for (int i=0; i< opVect.size(); i++) - mOptArgV[i] = opVect[i].c_str(); + mOptArgV = new char*[opVect.size()]; + Debug(2, "Size of Option Array: %d",opVect.size()); + for (size_t i=0; i< opVect.size(); i++) { + mOptArgV[i] = (char *)opVect[i].c_str(); + Debug(2, "set option %d to %s", i, opVect[i].c_str()); + } } - mLibvlcInstance = libvlc_new (opVect.size(), optArgV); + mLibvlcInstance = libvlc_new (opVect.size(), (const char* const*)mOptArgV); if(mLibvlcInstance == NULL) Fatal("Unable to create libvlc instance due to: %s", libvlc_errmsg()); diff --git a/src/zm_libvlc_camera.h b/src/zm_libvlc_camera.h index 75d97ad72..45a1e029f 100644 --- a/src/zm_libvlc_camera.h +++ b/src/zm_libvlc_camera.h @@ -46,7 +46,7 @@ class LibvlcCamera : public Camera protected: std::string mPath; std::string mOptions; - unisgned char **mOptArgV; + char **mOptArgV; LibvlcPrivateData mLibvlcData; std::string mTargetChroma; uint8_t mBpp;