x264enc: Read stream-format from the right place
Read the stream-format from "stream-format" and not from profile, also rename the "bytestream" variable to "stream_format" so it's easier to understand.
This commit is contained in:
parent
7aafba6f82
commit
3cb99f46b7
@ -1581,7 +1581,7 @@ gst_x264_enc_sink_set_caps (GstPad * pad, GstCaps * caps)
|
|||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
const gchar *profile;
|
const gchar *profile;
|
||||||
const gchar *level;
|
const gchar *level;
|
||||||
const gchar *bytestream;
|
const gchar *stream_format;
|
||||||
|
|
||||||
if (gst_caps_is_empty (allowed_caps)) {
|
if (gst_caps_is_empty (allowed_caps)) {
|
||||||
gst_caps_unref (allowed_caps);
|
gst_caps_unref (allowed_caps);
|
||||||
@ -1647,12 +1647,12 @@ gst_x264_enc_sink_set_caps (GstPad * pad, GstCaps * caps)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bytestream = gst_structure_get_string (s, "stream-format");
|
stream_format = gst_structure_get_string (s, "stream-format");
|
||||||
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_FROM_PROPERTY;
|
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_FROM_PROPERTY;
|
||||||
if (bytestream) {
|
if (stream_format) {
|
||||||
if (!strcmp (bytestream, "avc")) {
|
if (!strcmp (stream_format, "avc")) {
|
||||||
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_AVC;
|
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_AVC;
|
||||||
} else if (!strcmp (profile, "byte-stream")) {
|
} else if (!strcmp (stream_format, "byte-stream")) {
|
||||||
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_BYTE_STREAM;
|
encoder->current_byte_stream = GST_X264_ENC_STREAM_FORMAT_BYTE_STREAM;
|
||||||
} else {
|
} else {
|
||||||
/* means we have both in caps and _FROM_PROPERTY should be the option */
|
/* means we have both in caps and _FROM_PROPERTY should be the option */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user