mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
audioparsers: not so greedy minimum frame size
... which will be determined by parsing anyway, and avoids introducing redundant additional latency.
This commit is contained in:
parent
4f15c9e30e
commit
d17d6d74be
2 changed files with 7 additions and 2 deletions
|
@ -210,7 +210,7 @@ gst_ac3_parse_reset (GstAc3Parse * ac3parse)
|
|||
static void
|
||||
gst_ac3_parse_init (GstAc3Parse * ac3parse, GstAc3ParseClass * klass)
|
||||
{
|
||||
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (ac3parse), 64 * 2);
|
||||
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (ac3parse), 6);
|
||||
gst_ac3_parse_reset (ac3parse);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ GST_DEBUG_CATEGORY_STATIC (mpeg_audio_parse_debug);
|
|||
#define XING_TOC_FLAG 0x0004
|
||||
#define XING_VBR_SCALE_FLAG 0x0008
|
||||
|
||||
#define MIN_FRAME_SIZE 6
|
||||
|
||||
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
|
@ -237,7 +239,7 @@ gst_mpeg_audio_parse_start (GstBaseParse * parse)
|
|||
{
|
||||
GstMpegAudioParse *mp3parse = GST_MPEG_AUDIO_PARSE (parse);
|
||||
|
||||
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (mp3parse), 1024);
|
||||
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (mp3parse), MIN_FRAME_SIZE);
|
||||
GST_DEBUG_OBJECT (parse, "starting");
|
||||
|
||||
gst_mpeg_audio_parse_reset (mp3parse);
|
||||
|
@ -554,6 +556,9 @@ gst_mpeg_audio_parse_check_valid_frame (GstBaseParse * parse,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* restore default minimum */
|
||||
gst_base_parse_set_min_frame_size (parse, MIN_FRAME_SIZE);
|
||||
|
||||
*framesize = bpf;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue