Revision 8b889b34

View differences:

libavformat/rtpenc.c
131 131
        s->max_payload_size = n * TS_PACKET_SIZE;
132 132
        s->buf_ptr = s->buf;
133 133
        break;
134
    case CODEC_ID_H264:
135
        /* check for H.264 MP4 syntax */
136
        if (st->codec->extradata_size > 0 && st->codec->extradata &&
137
            st->codec->extradata[0] == 1) {
138
            s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
139
        }
140
        break;
134 141
    case CODEC_ID_AMR_NB:
135 142
    case CODEC_ID_AMR_WB:
136 143
        if (!s->max_frames_per_packet)
libavformat/rtpenc.h
50 50
    uint8_t *buf_ptr;
51 51

  
52 52
    int max_frames_per_packet;
53

  
54
    /**
55
     * Number of bytes used for H.264 NAL length, if the MP4 syntax is used
56
     * (1, 2 or 4)
57
     */
58
    int nal_length_size;
53 59
};
54 60

  
55 61
typedef struct RTPMuxContext RTPMuxContext;

Also available in: Unified diff