mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
avimux: Only accept raw aac
makes avimux reject aac streams that are not in raw format (stream-format=none) Fixes #598350
This commit is contained in:
parent
866d13e7b9
commit
bacd350483
1 changed files with 14 additions and 0 deletions
|
@ -174,6 +174,7 @@ static GstStaticPadTemplate audio_sink_factory =
|
||||||
"rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]; "
|
"rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]; "
|
||||||
"audio/mpeg, "
|
"audio/mpeg, "
|
||||||
"mpegversion = (int) 4, "
|
"mpegversion = (int) 4, "
|
||||||
|
"stream-format = (string) none, "
|
||||||
"rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]; "
|
"rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]; "
|
||||||
/*#if 0 VC6 doesn't support #if here ...
|
/*#if 0 VC6 doesn't support #if here ...
|
||||||
"audio/x-vorbis, "
|
"audio/x-vorbis, "
|
||||||
|
@ -847,8 +848,21 @@ gst_avi_mux_audsink_set_caps (GstPad * pad, GstCaps * vscaps)
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
GstBuffer *codec_data_buf = avipad->auds_codec_data;
|
GstBuffer *codec_data_buf = avipad->auds_codec_data;
|
||||||
|
const gchar *stream_format;
|
||||||
guint codec;
|
guint codec;
|
||||||
|
|
||||||
|
stream_format = gst_structure_get_string (structure, "stream-format");
|
||||||
|
if (stream_format) {
|
||||||
|
if (strcmp (stream_format, "none") != 0) {
|
||||||
|
GST_WARNING_OBJECT (avimux, "AAC's stream format '%s' is not "
|
||||||
|
"supported, please use 'none'", stream_format);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
GST_WARNING_OBJECT (avimux, "AAC's stream-format not specified, "
|
||||||
|
"assuming 'none'");
|
||||||
|
}
|
||||||
|
|
||||||
/* vbr case needs some special handling */
|
/* vbr case needs some special handling */
|
||||||
if (!codec_data_buf || GST_BUFFER_SIZE (codec_data_buf) < 2) {
|
if (!codec_data_buf || GST_BUFFER_SIZE (codec_data_buf) < 2) {
|
||||||
GST_WARNING_OBJECT (avimux, "no (valid) codec_data for AAC audio");
|
GST_WARNING_OBJECT (avimux, "no (valid) codec_data for AAC audio");
|
||||||
|
|
Loading…
Reference in a new issue