Revision e9a32230

View differences:

libavformat/oggenc.c
95 95
    oggstream->header_len[0] = 51;
96 96
    oggstream->header[0] = av_mallocz(51); // per ogg flac specs
97 97
    p = oggstream->header[0];
98
    if (!p)
99
        return AVERROR_NOMEM;
98 100
    bytestream_put_byte(&p, 0x7F);
99 101
    bytestream_put_buffer(&p, "FLAC", 4);
100 102
    bytestream_put_byte(&p, 1); // major version
......
107 109
    oggstream->header_len[1] = 1+3+4+strlen(vendor)+4;
108 110
    oggstream->header[1] = av_mallocz(oggstream->header_len[1]);
109 111
    p = oggstream->header[1];
112
    if (!p)
113
        return AVERROR_NOMEM;
110 114
    bytestream_put_byte(&p, 0x84); // last metadata block and vorbis comment
111 115
    bytestream_put_be24(&p, oggstream->header_len[1] - 4);
112 116
    bytestream_put_le32(&p, strlen(vendor));

Also available in: Unified diff