Skip to content

Commit

Permalink
Fix pp-rec post-processing for h265 by handling nalu delimiter for mi…
Browse files Browse the repository at this point in the history
…ssing types (#3274)
  • Loading branch information
heyfluke authored Nov 14, 2023
1 parent 7b91e80 commit 6554956
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/postprocessing/pp-h265.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ int janus_pp_h265_process(FILE *file, janus_pp_frame_packet *list, int *working)
memcpy(&unit, buffer, sizeof(uint16_t));
unit = ntohs(unit);
uint8_t type = (unit & 0x7E00) >> 9;
if(type == 32 || type == 33 || type == 34) {
if(type == 32 || type == 33 || type == 34 || type == 1) {
if(type == 32 || type == 33) {
keyFrame = 1;
if(!keyframe_found) {
Expand Down Expand Up @@ -582,6 +582,8 @@ int janus_pp_h265_process(FILE *file, janus_pp_frame_packet *list, int *working)
/* Skip the FU header */
buffer += 3;
len -= 3;
} else {
JANUS_LOG(LOG_HUGE, "unhandled nalu type: %d\n", type);
}
/* Frame manipulation */
memcpy(received_frame + frameLen, buffer, len);
Expand Down

0 comments on commit 6554956

Please sign in to comment.