You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Add new static function to determine if video/audio codecs names are valid (#134)
This commit is contained in:
@@ -296,6 +296,15 @@ void FFmpegWriter::SetOption(StreamType stream, string name, string value)
|
||||
|
||||
}
|
||||
|
||||
/// Determine if codec name is valid
|
||||
bool FFmpegWriter::IsValidCodec(string codec_name) {
|
||||
// Find the codec (if any)
|
||||
if (avcodec_find_encoder_by_name(codec_name.c_str()) == NULL)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
// Prepare & initialize streams and open codecs
|
||||
void FFmpegWriter::PrepareStreams()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user