1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

winegstreamer: Set streamheader field for h264 caps.

For h264 byte-stream format, we should set "streamheader".
"codec_data" is for avc.

We also set timestamp of the buffer to 0 because
mp4mux will be error if the PTS is none.
This commit is contained in:
Ziqing Hui 2023-12-05 16:37:51 +08:00 committed by Alexandre Julliard
parent 9be491e80f
commit 95b8d7fa60

View file

@ -737,8 +737,10 @@ static GstCaps *wg_format_to_caps_video_h264(const struct wg_format *format)
return NULL;
}
GST_BUFFER_PTS(buffer) = 0;
GST_BUFFER_DTS(buffer) = 0;
gst_buffer_fill(buffer, 0, format->u.video_h264.codec_data, format->u.video_h264.codec_data_len);
gst_caps_set_simple(caps, "codec_data", GST_TYPE_BUFFER, buffer, NULL);
gst_caps_set_simple(caps, "streamheader", GST_TYPE_BUFFER, buffer, NULL);
gst_buffer_unref(buffer);
}