nschlia / ffmpegfs

FUSE-based transcoding filesystem with video support from many formats to FLAC, MP4, TS, WebM, OGG, MP3, HLS, and others.
https://nschlia.github.io/ffmpegfs/
GNU General Public License v3.0
196 stars 14 forks source link

check if stream audio/video in FFmpeg_Transcoder::can_copy_stream #152

Closed mihaiush closed 6 months ago

mihaiush commented 6 months ago

fixes #151

nschlia commented 6 months ago

The pull request does not build with clang because of this line:

 ffmpeg_transcoder.cc:836:18: note: in instantiation of function template specialization 'Logging::debug<const char *, std::basic_string<char> &, const char *, const char *>' requested here
Logging::debug(virtname(), "Check autocopy strict: %1: %2 -> %3", codec_type_str, avcodec_get_name(codec_in), avcodec_get_name(codec_out));

Please change it to:

 Logging::debug(virtname(), "Check autocopy strict: %1: %2 -> %3", codec_type_str.c_str(), avcodec_get_name(codec_in), avcodec_get_name(codec_out));

Basically you need to change codec_type_str to codec_type_str.c_str(). clang does not allow objects to be passed as varargs (C++ actually does not, this is a GNU extension).

nschlia commented 6 months ago

@mihaiush Pull request accepted, thanks for the bug report & the fix!