Skip to content

Commit

Permalink
fixed #1838
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Jul 5, 2021
1 parent 27742ac commit 8281884
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ietf/rtp_pck_mpeg12.c
Expand Up @@ -123,6 +123,7 @@ GF_Err gp_rtp_builder_do_mpeg12_video(GP_RTPPacketizer *builder, u8 *data, u32 d

/*no flsuh (no aggregation)*/
if (!data) return GF_OK;
if (data_size<4) return GF_NON_COMPLIANT_BITSTREAM;

offset = 0;
have_seq = GF_FALSE;
Expand Down Expand Up @@ -152,6 +153,7 @@ GF_Err gp_rtp_builder_do_mpeg12_video(GP_RTPPacketizer *builder, u8 *data, u32 d
mpv_hdr[3] = 0;

if ((pic_type==2) || (pic_type== 3)) {
if (data_size<5) return GF_NON_COMPLIANT_BITSTREAM;
mpv_hdr[3] = (u8) ((((u32)payload[3]) << 5) & 0xf);
if ((payload[4] & 0x80) != 0) mpv_hdr[3] |= 0x10;
if (pic_type == 3) mpv_hdr[3] |= (payload[4] >> 3) & 0xf;
Expand Down

0 comments on commit 8281884

Please sign in to comment.