File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,17 @@ namespace av {
6
6
namespace internal {
7
7
8
8
bool codec_supported (const AVCodecTag * const *codecTag, const FmtCodec &codec)
9
+ {
10
+ return codec_supported (codecTag, codec.id ());
11
+ }
12
+
13
+ bool codec_supported (const AVCodecTag *const *codecTag, AVCodecID codec_id)
9
14
{
10
15
if (!codecTag) // any codec supported
11
16
return true ;
12
17
13
18
unsigned int tag;
14
- return !!av_codec_get_tag2 (codecTag, codec. id () , &tag);
19
+ return !!av_codec_get_tag2 (codecTag, codec_id , &tag);
15
20
}
16
21
17
22
} // ::internal
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ using avcpp_format_const = typename std::conditional<
19
19
using FmtCodec = class Codec ;
20
20
namespace internal {
21
21
bool codec_supported (const AVCodecTag *const *codecTag, const FmtCodec &codec);
22
+ bool codec_supported (const AVCodecTag *const *codecTag, AVCodecID codec_id);
22
23
} // ::internal
23
24
24
25
template <typename T>
@@ -56,6 +57,13 @@ struct Format : public FFWrapperPtr<T>
56
57
return internal::codec_supported (m_raw->codec_tag , codec);
57
58
}
58
59
60
+ bool codecSupported (AVCodecID codec_id) const noexcept
61
+ {
62
+ if (!m_raw)
63
+ return false ;
64
+ return internal::codec_supported (m_raw->codec_tag , codec_id);
65
+ }
66
+
59
67
protected:
60
68
using FFWrapperPtr<T>::m_raw;
61
69
};
You can’t perform that action at this time.
0 commit comments