mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
audioparsers: add back segment clipping to parsers that have lost it
The pre_push_frame default clipping behaviour was introduced in 2010 with commit30be03004e
and modified with commit4163969a24
in 2011, when most parsers didn't implement a pre_push_frame yet. Not having it meant that clipping was done by default. Those that did implement a pre_push_frame (flacparse and mpegaudioparse) at the time, had the flag adjusted as part of the 2011 refactor work. All other parsers got a pre_push_frame vfunc implementation only in 2013, but seem to have forgot to keep the clipping behaviour, as was done automatically when a pre_push_frame implementation doesn't exist for the parser. aacparse lost it with commit91d4abcea
in July 2013; the others in Dec 2013 as part of AUDIO_CODEC tag posting in commits6f89b430e
,d2ab5199b
,29f2cae12
,753d3c23a
and292780574
.
This commit is contained in:
parent
92e4ecef4c
commit
ab6e49e9cc
6 changed files with 12 additions and 0 deletions
|
@ -1480,6 +1480,8 @@ gst_aac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
gst_buffer_get_size (frame->out_buffer) - header_size);
|
gst_buffer_get_size (frame->out_buffer) - header_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -808,6 +808,8 @@ gst_ac3_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
ac3parse->sent_codec_tag = TRUE;
|
ac3parse->sent_codec_tag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -448,5 +448,7 @@ gst_amr_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
amrparse->sent_codec_tag = TRUE;
|
amrparse->sent_codec_tag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -613,5 +613,7 @@ gst_dca_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
dcaparse->sent_codec_tag = TRUE;
|
dcaparse->sent_codec_tag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -530,5 +530,7 @@ gst_sbc_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
sbcparse->sent_codec_tag = TRUE;
|
sbcparse->sent_codec_tag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -704,5 +704,7 @@ gst_wavpack_parse_pre_push_frame (GstBaseParse * parse,
|
||||||
wavpackparse->sent_codec_tag = TRUE;
|
wavpackparse->sent_codec_tag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue