Revision 8a2679ad

View differences:

libavformat/rtpenc.c
133 133
        break;
134 134
    case CODEC_ID_H264:
135 135
        /* check for H.264 MP4 syntax */
136
        if (st->codec->extradata_size > 0 && st->codec->extradata &&
137
            st->codec->extradata[0] == 1) {
136
        if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
138 137
            s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
139 138
        }
140 139
        break;

Also available in: Unified diff