Revision 11eb3cea

View differences:

libavcodec/libtheoraenc.c
59 59
        message = "extradata_size would overflow";
60 60
    } else {
61 61
        newdata = av_realloc(avc_context->extradata, newsize);
62
        if (newdata == NULL) {
62
        if (newdata == NULL)
63 63
            message = "av_realloc failed";
64
        }
65 64
    }
66 65
    if (message != NULL) {
67 66
        av_log(avc_context, AV_LOG_ERROR, "concatenate_packet failed: %s\n", message);
......
151 150

  
152 151
    /* Header */
153 152
    theora_encode_header( &(h->t_state), &o_packet );
154
    if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) {
153
    if (concatenate_packet( &offset, avc_context, &o_packet ) != 0)
155 154
        return -1;
156
    }
157 155

  
158 156
    /* Comment */
159 157
    theora_comment_init( &t_comment );
160 158
    theora_encode_comment( &t_comment, &o_packet );
161
    if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) {
159
    if (concatenate_packet( &offset, avc_context, &o_packet ) != 0)
162 160
        return -1;
163
    }
164 161
    /* Clear up theora_comment struct before we reset the packet */
165 162
    theora_comment_clear( &t_comment );
166 163
    /* And despite documentation to the contrary, theora_comment_clear
......
169 166

  
170 167
    /* Tables */
171 168
    theora_encode_tables( &(h->t_state), &o_packet );
172
    if (concatenate_packet( &offset, avc_context, &o_packet ) != 0) {
169
    if (concatenate_packet( &offset, avc_context, &o_packet ) != 0)
173 170
        return -1;
174
    }
175 171

  
176 172
    /* Set up the output AVFrame */
177 173
    avc_context->coded_frame= avcodec_alloc_frame();

Also available in: Unified diff