Ticket #8334: mythosx.diff

File mythosx.diff, 794 bytes (added by dougt@…, 10 years ago)

patch to libs/libavcodec/mpeg12.c

  • libs/libavcodec/mpeg12.c

     
    23122312        }
    23132313    } else if (buf_end - p >= 3 && p[0] == 0x03 && ((p[1]&0x7f) == 0x01)) {
    23142314        /// SCTE 20 encoding of CEA-608
    2315         uint cc_count = p[2]>>3;
    2316         uint cc_bits = cc_count * 26;
    2317         uint cc_bytes = (cc_bits + 7 - 3) / 8;
     2315        uint8_t cc_count = p[2]>>3;
     2316        uint8_t cc_bits = cc_count * 26;
     2317        uint8_t cc_bytes = (cc_bits + 7 - 3) / 8;
    23182318        Mpeg1Context *s1 = avctx->priv_data;
    23192319        MpegEncContext *s = &s1->mpeg_enc_ctx;
    23202320        if (buf_end - p >= (2+cc_bytes) /*&& (s->tmp_atsc_cc_len + 2 + 3*cc_count) < ATSC_CC_BUF_SIZE*/) {