~ubuntu-branches/ubuntu/saucy/gst-libav1.0/saucy-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libavcodec/faxcompr.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-07-30 09:00:15 UTC
  • mfrom: (1.1.16) (7.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130730090015-sc1ou2yssu7q5w4e
Tags: 1.1.3-1
* New upstream development snapshot:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.1.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
275
275
{
276
276
    int j;
277
277
    GetBitContext gb;
278
 
    int *runs, *ref, *runend;
 
278
    int *runs, *ref = NULL, *runend;
279
279
    int ret;
280
280
    int runsize= avctx->width + 2;
 
281
    int err = 0;
281
282
 
282
283
    runs = av_malloc(runsize * sizeof(runs[0]));
283
284
    ref  = av_malloc(runsize * sizeof(ref[0]));
 
285
    if (!runs || ! ref) {
 
286
        err = AVERROR(ENOMEM);
 
287
        goto fail;
 
288
    }
284
289
    ref[0] = avctx->width;
285
290
    ref[1] = 0;
286
291
    ref[2] = 0;
290
295
        if(compr == TIFF_G4){
291
296
            ret = decode_group3_2d_line(avctx, &gb, avctx->width, runs, runend, ref);
292
297
            if(ret < 0){
293
 
                av_free(runs);
294
 
                av_free(ref);
295
 
                return -1;
 
298
                err = -1;
 
299
                goto fail;
296
300
            }
297
301
        }else{
298
302
            int g3d1 = (compr == TIFF_G3) && !(opts & 1);
313
317
        }
314
318
        dst += stride;
315
319
    }
 
320
fail:
316
321
    av_free(runs);
317
322
    av_free(ref);
318
 
    return 0;
 
323
    return err;
319
324
}