~ppsspp/ppsspp/ffmpeg

« back to all changes in this revision

Viewing changes to libavcodec/vqavideo.c

  • Committer: Henrik Rydgård
  • Date: 2014-01-03 10:44:32 UTC
  • Revision ID: git-v1:87c6c126784b1718bfa448ecf2e6a9fef781eb4e
Update our ffmpeg snapshot to a clone of the official repository.

This is because Maxim's at3plus support has been officially merged!

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
    /* allocate decode buffer */
180
180
    s->decode_buffer_size = (s->width / s->vector_width) *
181
181
        (s->height / s->vector_height) * 2;
182
 
    s->decode_buffer = av_malloc(s->decode_buffer_size);
 
182
    s->decode_buffer = av_mallocz(s->decode_buffer_size);
183
183
    if (!s->decode_buffer)
184
184
        goto fail;
185
185
 
238
238
 
239
239
        /* 0x80 means that frame is finished */
240
240
        if (opcode == 0x80)
241
 
            return 0;
 
241
            break;
242
242
 
243
243
        if (dest_index >= dest_size) {
244
244
            av_log(s->avctx, AV_LOG_ERROR, "decode_format80 problem: dest_index (%d) exceeded dest_size (%d)\n",
303
303
     * codebook entry; it is not important for compressed codebooks because
304
304
     * not every entry needs to be filled */
305
305
    if (check_size)
306
 
        if (dest_index < dest_size)
 
306
        if (dest_index < dest_size) {
307
307
            av_log(s->avctx, AV_LOG_ERROR, "decode_format80 problem: decode finished with dest_index (%d) < dest_size (%d)\n",
308
308
                dest_index, dest_size);
 
309
            memset(dest + dest_index, 0, dest_size - dest_index);
 
310
        }
309
311
 
310
312
    return 0; // let's display what we decoded anyway
311
313
}