mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
avmux: Place pva case after generic case
In the function gst_ffmpeg_formatid_get_codecids() in the if / else if construct the special case !strcmp (format_name, "pva") should be handled before the generic case (plugin->audio_codec != AV_CODEC_ID_NONE) || (plugin->video_codec != AV_CODEC_ID_NONE) This patch fixes the ordering. I stumbled accorss this issue while adding a new format to gst_ffmpeg_formatid_get_codecids() https://bugzilla.gnome.org/show_bug.cgi?id=796738
This commit is contained in:
parent
4596249496
commit
962d2a78fe
1 changed files with 12 additions and 12 deletions
|
@ -3770,6 +3770,18 @@ gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
|
|||
};
|
||||
*video_codec_list = gif_image_list;
|
||||
*audio_codec_list = NULL;
|
||||
} else if ((!strcmp (format_name, "pva"))) {
|
||||
static enum AVCodecID pga_video_list[] = {
|
||||
AV_CODEC_ID_MPEG2VIDEO,
|
||||
AV_CODEC_ID_NONE
|
||||
};
|
||||
static enum AVCodecID pga_audio_list[] = {
|
||||
AV_CODEC_ID_MP2,
|
||||
AV_CODEC_ID_NONE
|
||||
};
|
||||
|
||||
*video_codec_list = pga_video_list;
|
||||
*audio_codec_list = pga_audio_list;
|
||||
} else if ((plugin->audio_codec != AV_CODEC_ID_NONE) ||
|
||||
(plugin->video_codec != AV_CODEC_ID_NONE)) {
|
||||
tmp_vlist[0] = plugin->video_codec;
|
||||
|
@ -3777,18 +3789,6 @@ gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
|
|||
|
||||
*video_codec_list = tmp_vlist;
|
||||
*audio_codec_list = tmp_alist;
|
||||
} else if ((!strcmp (format_name, "pva"))) {
|
||||
static enum AVCodecID tgp_video_list[] = {
|
||||
AV_CODEC_ID_MPEG2VIDEO,
|
||||
AV_CODEC_ID_NONE
|
||||
};
|
||||
static enum AVCodecID tgp_audio_list[] = {
|
||||
AV_CODEC_ID_MP2,
|
||||
AV_CODEC_ID_NONE
|
||||
};
|
||||
|
||||
*video_codec_list = tgp_video_list;
|
||||
*audio_codec_list = tgp_audio_list;
|
||||
} else {
|
||||
GST_LOG ("Format %s not found", format_name);
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue