File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -216,16 +216,19 @@ OptionArrayMap getAvailableOptionsPerVideoCodec()
216
216
// iterate on codecs
217
217
while (codec)
218
218
{
219
+ if (!codec->name )
220
+ continue ;
221
+
219
222
// add only video codec
220
223
if (codec->type == AVMEDIA_TYPE_VIDEO)
221
224
{
225
+ const std::string videoCodecName (codec->name );
226
+ OptionArray options;
222
227
if (codec->priv_class )
223
228
{
224
- std::string videoCodecName (codec->name );
225
- OptionArray options;
226
229
loadOptions (options, (void *)&codec->priv_class , 0 );
227
- videoCodecOptions.insert (std::make_pair (videoCodecName, options));
228
230
}
231
+ videoCodecOptions.insert (std::make_pair (videoCodecName, options));
229
232
}
230
233
codec = av_codec_next (codec);
231
234
}
@@ -241,16 +244,19 @@ OptionArrayMap getAvailableOptionsPerAudioCodec()
241
244
// iterate on codecs
242
245
while (codec)
243
246
{
247
+ if (!codec->name )
248
+ continue ;
249
+
244
250
// add only audio codec
245
251
if (codec->type == AVMEDIA_TYPE_AUDIO)
246
252
{
253
+ const std::string audioCodecName (codec->name );
254
+ OptionArray options;
247
255
if (codec->priv_class )
248
256
{
249
- std::string audioCodecName (codec->name );
250
- OptionArray options;
251
257
loadOptions (options, (void *)&codec->priv_class , 0 );
252
- audioCodecOptions.insert (std::make_pair (audioCodecName, options));
253
258
}
259
+ audioCodecOptions.insert (std::make_pair (audioCodecName, options));
254
260
}
255
261
codec = av_codec_next (codec);
256
262
}
You can’t perform that action at this time.
0 commit comments