I have multiple input devices (Cameras), every one of them is encoded to their own file. Everything is working fine. I have only one input AVFormatContext. This is how cameras are opened
for (int i = 0; i < CameraList.Count; i++) { var camera = CameraList[i]; AVDictionary* optionalOpts; if (!string.IsNullOrEmpty(camera.InputResolution)) ffmpeg.av_dict_set(&optionalOpts, "video_size", camera.InputResolution, 0); ffmpeg.av_dict_copy(&optionalOpts, options, 0); AVInputFormat* inputFormat = null; if (!string.IsNullOrEmpty(camera.Format)) { inputFormat = ffmpeg.av_find_input_format(camera.Format); if (inputFormat == null) // exception } if (ffmpeg.avformat_open_input(&pInputFmtCtx, camera.Url, inputFormat, &optionalOpts) != 0) { if (ffmpeg.avformat_open_input(&pInputFmtCtx, camera.Url, inputFormat, &options) != 0) // exception } } The problem is that the application crashes when having more than one input, specifically here: fixed (AVFormatContext** p = &InputFormatContext) ffmpeg.avformat_close_input(p); If I have single input (one video and one audio stream) everything is fine. There is no errors thrown, just crash and that's it.What am I doing wrong?
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org with subject "unsubscribe".