Commit 95b8d7fa authored by Ziqing Hui's avatar Ziqing Hui Committed by Alexandre Julliard

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.
parent 9be491e8
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment