mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +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);
|
||||
gst_caps_set_value (caps, "stream-format", &arr);
|
||||
g_value_unset (&arr);
|
||||
} else {
|
||||
if (context && context->extradata_size > 0) {
|
||||
} else if (context) {
|
||||
if (context->extradata_size > 0) {
|
||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "avc",
|
||||
NULL);
|
||||
} else {
|
||||
|
@ -1328,8 +1328,8 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
|
|||
g_value_unset (&item);
|
||||
gst_caps_set_value (caps, "stream-format", &arr);
|
||||
g_value_unset (&arr);
|
||||
} else {
|
||||
if (context && context->extradata_size > 0) {
|
||||
} else if (context) {
|
||||
if (context->extradata_size > 0) {
|
||||
/* FIXME: Assume hvc1 */
|
||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "hvc1",
|
||||
NULL);
|
||||
|
@ -1472,7 +1472,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
|
|||
NULL);
|
||||
gst_codec_utils_aac_caps_set_level_and_profile (caps,
|
||||
context->extradata, context->extradata_size);
|
||||
} else {
|
||||
} else if (context) {
|
||||
/* FIXME: Assume adts */
|
||||
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "adts",
|
||||
NULL);
|
||||
|
|
Loading…
Reference in a new issue