Skip to content

Commit

Permalink
#4343 always include sps and pps
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Sep 5, 2024
1 parent ce48f95 commit caf91e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xpra/codecs/nvidia/nvenc/encoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@ cdef class Encoder:
#h264.sliceModeData = 0
h264.sliceMode = 3 #sliceModeData specifies the number of slices
h264.sliceModeData = 1 #1 slice!
h264.disableSPSPPS = 1
h264.disableSPSPPS = 0
h264.repeatSPSPPS = 0
h264.outputAUD = 1
h264.outputPictureTimingSEI = 1
Expand Down Expand Up @@ -2660,9 +2660,10 @@ cdef class Encoder:
if self.frames==0:
#only the first frame needs to be IDR (as we never lose frames)
pic.pictureType = NV_ENC_PIC_TYPE_IDR
pic.encodePicFlags = NV_ENC_PIC_FLAG_OUTPUT_SPSPPS
pic.encodePicFlags = NV_ENC_PIC_FLAG_OUTPUT_SPSPPS | NV_ENC_PIC_FLAG_FORCEIDR
else:
pic.pictureType = NV_ENC_PIC_TYPE_P
pic.encodePicFlags = NV_ENC_PIC_FLAG_OUTPUT_SPSPPS
if self.encoding=="h264":
pic.codecPicParams.h264PicParams.displayPOCSyntax = 2*self.frames
pic.codecPicParams.h264PicParams.refPicFlag = self.frames==0
Expand Down

0 comments on commit caf91e2

Please sign in to comment.