mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
ext/x264/gstx264enc.c: Use hyphen in property name, perform safety buffer size check prior to mem access, and some mo...
Original commit message from CVS: * ext/x264/gstx264enc.c: (gst_x264_enc_class_init), (gst_x264_enc_header_buf), (gst_x264_enc_encode_frame): Use hyphen in property name, perform safety buffer size check prior to mem access, and some more parentheses in macro.
This commit is contained in:
parent
8fcdca999a
commit
b5f61341dd
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2009-01-05 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
|
||||||
|
|
||||||
|
* ext/x264/gstx264enc.c: (gst_x264_enc_class_init),
|
||||||
|
(gst_x264_enc_header_buf), (gst_x264_enc_encode_frame):
|
||||||
|
Use hyphen in property name, perform safety buffer size check
|
||||||
|
prior to mem access, and some more parentheses in macro.
|
||||||
|
|
||||||
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* gst/mxf/mxfaes-bwf.c:
|
* gst/mxf/mxfaes-bwf.c:
|
||||||
|
|
|
@ -334,7 +334,7 @@ gst_x264_enc_class_init (GstX264EncClass * klass)
|
||||||
"Enable trellis searched quantization", ARG_TRELLIS_DEFAULT,
|
"Enable trellis searched quantization", ARG_TRELLIS_DEFAULT,
|
||||||
G_PARAM_READWRITE));
|
G_PARAM_READWRITE));
|
||||||
g_object_class_install_property (gobject_class, ARG_KEYINT_MAX,
|
g_object_class_install_property (gobject_class, ARG_KEYINT_MAX,
|
||||||
g_param_spec_uint ("key_int_max", "Key-frame maximal interval",
|
g_param_spec_uint ("key-int-max", "Key-frame maximal interval",
|
||||||
"Maximal distance between two key-frames (0 for automatic)",
|
"Maximal distance between two key-frames (0 for automatic)",
|
||||||
0, G_MAXINT, ARG_KEYINT_MAX_DEFAULT, G_PARAM_READWRITE));
|
0, G_MAXINT, ARG_KEYINT_MAX_DEFAULT, G_PARAM_READWRITE));
|
||||||
g_object_class_install_property (gobject_class, ARG_CABAC,
|
g_object_class_install_property (gobject_class, ARG_CABAC,
|
||||||
|
@ -667,8 +667,9 @@ gst_x264_enc_header_buf (GstX264Enc * encoder)
|
||||||
|
|
||||||
/* x264 is expected to return an SEI (some identification info),
|
/* x264 is expected to return an SEI (some identification info),
|
||||||
* followed by an SPS and PPS */
|
* followed by an SPS and PPS */
|
||||||
if (i_nal != 3 || nal[1].i_type != 7 || nal[2].i_type != 8) {
|
if (i_nal != 3 || nal[1].i_type != 7 || nal[2].i_type != 8 ||
|
||||||
GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, NULL,
|
nal[1].i_payload < 4 || nal[2].i_payload < 1) {
|
||||||
|
GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, (NULL),
|
||||||
("Unexpected x264 header."));
|
("Unexpected x264 header."));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -941,7 +942,7 @@ gst_x264_enc_encode_frame (GstX264Enc * encoder, x264_picture_t * pic_in,
|
||||||
duration = GST_BUFFER_DURATION (in_buf);
|
duration = GST_BUFFER_DURATION (in_buf);
|
||||||
gst_buffer_unref (in_buf);
|
gst_buffer_unref (in_buf);
|
||||||
} else {
|
} else {
|
||||||
GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, NULL,
|
GST_ELEMENT_ERROR (encoder, STREAM, ENCODE, (NULL),
|
||||||
("Timestamp queue empty."));
|
("Timestamp queue empty."));
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue