mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
typefindfunctions: differentiate h265 from h264
in some cases, the algo gives the same probability to h264 and h265 for h26x stream resulting in a h265 stream detected as a h264. if sps/pps/vps detected, increase the probabilty. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/957>
This commit is contained in:
parent
5e08ede8f6
commit
84b357dd5f
1 changed files with 12 additions and 2 deletions
|
@ -2887,7 +2887,12 @@ h264_video_type_find (GstTypeFind * tf, gpointer unused)
|
|||
seen_pps, seen_sps, seen_idr, seen_ssps);
|
||||
|
||||
if (good >= 2 && bad == 0) {
|
||||
gst_type_find_suggest (tf, GST_TYPE_FIND_POSSIBLE, H264_VIDEO_CAPS);
|
||||
GstTypeFindProbability probability = GST_TYPE_FIND_POSSIBLE;
|
||||
|
||||
if (seen_pps && seen_sps)
|
||||
probability = GST_TYPE_FIND_LIKELY;
|
||||
|
||||
gst_type_find_suggest (tf, probability, H264_VIDEO_CAPS);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2980,7 +2985,12 @@ h265_video_type_find (GstTypeFind * tf, gpointer unused)
|
|||
seen_pps, seen_sps, seen_vps, seen_irap);
|
||||
|
||||
if (good >= 2 && bad == 0) {
|
||||
gst_type_find_suggest (tf, GST_TYPE_FIND_POSSIBLE, H265_VIDEO_CAPS);
|
||||
GstTypeFindProbability probability = GST_TYPE_FIND_POSSIBLE;
|
||||
|
||||
if (seen_pps && seen_sps && seen_vps)
|
||||
probability = GST_TYPE_FIND_LIKELY;
|
||||
|
||||
gst_type_find_suggest (tf, probability, H265_VIDEO_CAPS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue