mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
avcodecmap: exclude avc3 stream format from AV_CODEC_ID_H264
As part of the changes to support the "avc3" variant of the ISO-BMFF (see bug #702004) a new stream-format has been created (video/x-h264, stream-format="avc3", alignment="au") that requires changes to gstavcodecmap to exclude this format because avdec_h264 expects the SPS and PPS to be in the codec_data. Amendment 2 of ISO/IEC 14496-15 (AVC file format) is defining a new structure for fragmented MP4 called "avc3". The principal difference between AVC1 and AVC3 is the location of the codec initialisation data (e.g. SPS, PPS). In AVC1 this data is placed in the initial MOOV box (moov.trak.mdia.minf.stbl.stsd.avc1) but in AVC3 this data goes in the first sample of every fragment. https://bugzilla.gnome.org/show_bug.cgi?id=702004
This commit is contained in:
parent
690ca42e6e
commit
61153a5ac2
1 changed files with 13 additions and 0 deletions
|
@ -1142,6 +1142,19 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps =
|
||||
gst_ff_vid_caps_new (context, NULL, codec_id, encode, "video/x-h264",
|
||||
"alignment", G_TYPE_STRING, "au", NULL);
|
||||
if (!encode) {
|
||||
GValue arr = { 0, };
|
||||
GValue item = { 0, };
|
||||
g_value_init (&arr, GST_TYPE_LIST);
|
||||
g_value_init (&item, G_TYPE_STRING);
|
||||
g_value_set_string (&item, "avc");
|
||||
gst_value_list_append_value (&arr, &item);
|
||||
g_value_set_string (&item, "byte-stream");
|
||||
gst_value_list_append_value (&arr, &item);
|
||||
g_value_unset (&item);
|
||||
gst_caps_set_value (caps, "stream-format", &arr);
|
||||
g_value_unset (&arr);
|
||||
}
|
||||
break;
|
||||
|
||||
case AV_CODEC_ID_INDEO5:
|
||||
|
|
Loading…
Reference in a new issue