mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
avdemux: Only set stream-format for H264/H265/AAC when we have a context
Otherwise we don't know yet whether we'll have extradata/codec_data, so can't decide on the stream-format yet.
This commit is contained in:
parent
4f51000920
commit
34b1eb117f
1 changed files with 5 additions and 5 deletions
|
@ -1299,8 +1299,8 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
|
||||||
g_value_unset (&item);
|
g_value_unset (&item);
|
||||||
gst_caps_set_value (caps, "stream-format", &arr);
|
gst_caps_set_value (caps, "stream-format", &arr);
|
||||||
g_value_unset (&arr);
|
g_value_unset (&arr);
|
||||||
} else {
|
} else if (context) {
|
||||||
if (context && context->extradata_size > 0) {
|
if (context->extradata_size > 0) {
|
||||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "avc",
|
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "avc",
|
||||||
NULL);
|
NULL);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1328,8 +1328,8 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
|
||||||
g_value_unset (&item);
|
g_value_unset (&item);
|
||||||
gst_caps_set_value (caps, "stream-format", &arr);
|
gst_caps_set_value (caps, "stream-format", &arr);
|
||||||
g_value_unset (&arr);
|
g_value_unset (&arr);
|
||||||
} else {
|
} else if (context) {
|
||||||
if (context && context->extradata_size > 0) {
|
if (context->extradata_size > 0) {
|
||||||
/* FIXME: Assume hvc1 */
|
/* FIXME: Assume hvc1 */
|
||||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "hvc1",
|
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "hvc1",
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -1472,7 +1472,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
|
||||||
NULL);
|
NULL);
|
||||||
gst_codec_utils_aac_caps_set_level_and_profile (caps,
|
gst_codec_utils_aac_caps_set_level_and_profile (caps,
|
||||||
context->extradata, context->extradata_size);
|
context->extradata, context->extradata_size);
|
||||||
} else {
|
} else if (context) {
|
||||||
/* FIXME: Assume adts */
|
/* FIXME: Assume adts */
|
||||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "adts",
|
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "adts",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
Loading…
Reference in a new issue