diff options
author | Georg Ottinger <g.ottinger@gmx.at> | 2018-07-03 13:15:54 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2018-07-26 16:22:30 -0400 |
commit | 962d2a78fe28bb1fee6cd9259170d9f2ac2ce884 (patch) | |
tree | bae5b2cafd0c340b49c160553eae0a332b8e599f /ext/libav/gstavcodecmap.c | |
parent | 4596249496386772535eddfda94b2e543169a564 (diff) | |
download | gst-libav-962d2a78fe28bb1fee6cd9259170d9f2ac2ce884.tar.gz |
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
Diffstat (limited to 'ext/libav/gstavcodecmap.c')
-rw-r--r-- | ext/libav/gstavcodecmap.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c index 19fef71..be95828 100644 --- a/ext/libav/gstavcodecmap.c +++ b/ext/libav/gstavcodecmap.c @@ -3770,25 +3770,25 @@ gst_ffmpeg_formatid_get_codecids (const gchar * format_name, }; *video_codec_list = gif_image_list; *audio_codec_list = NULL; - } else if ((plugin->audio_codec != AV_CODEC_ID_NONE) || - (plugin->video_codec != AV_CODEC_ID_NONE)) { - tmp_vlist[0] = plugin->video_codec; - tmp_alist[0] = plugin->audio_codec; - - *video_codec_list = tmp_vlist; - *audio_codec_list = tmp_alist; } else if ((!strcmp (format_name, "pva"))) { - static enum AVCodecID tgp_video_list[] = { + static enum AVCodecID pga_video_list[] = { AV_CODEC_ID_MPEG2VIDEO, AV_CODEC_ID_NONE }; - static enum AVCodecID tgp_audio_list[] = { + static enum AVCodecID pga_audio_list[] = { AV_CODEC_ID_MP2, AV_CODEC_ID_NONE }; - *video_codec_list = tgp_video_list; - *audio_codec_list = tgp_audio_list; + *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; + tmp_alist[0] = plugin->audio_codec; + + *video_codec_list = tmp_vlist; + *audio_codec_list = tmp_alist; } else { GST_LOG ("Format %s not found", format_name); return FALSE; |