h265parse: Differentiate PREFIX SEI from SUFFIX
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 9 Oct 2018 20:42:58 +0000 (16:42 -0400)
committerNicolas Dufresne <nicolas@ndufresne.ca>
Wed, 15 Apr 2020 14:10:16 +0000 (14:10 +0000)
There is some code to fixup broken stream that uses the SEI location,
this code is meant to locate SUFFIX SEI only. This should prevent
unwanted side effect if SUFFIX SEI is used.

gst/videoparsers/gsth265parse.c

index c1f094f..4b5ec72 100644 (file)
@@ -839,7 +839,7 @@ gst_h265_parse_process_nal (GstH265Parse * h265parse, GstH265NalUnit * nalu)
       gst_h265_parse_process_sei (h265parse, nalu);
 
       /* mark SEI pos */
-      if (h265parse->sei_pos == -1) {
+      if (nal_type == GST_H265_NAL_PREFIX_SEI && h265parse->sei_pos == -1) {
         if (h265parse->transform)
           h265parse->sei_pos = gst_adapter_available (h265parse->frame_out);
         else