~siretart/ubuntu/utopic/libav/libav10

« back to all changes in this revision

Viewing changes to libavcodec/flacenc.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-05-11 12:28:45 UTC
  • mfrom: (1.1.22) (2.1.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140511122845-gxvpts83i958y0i5
Tags: 6:10.1-1
* New upstream release 10:
   - pcm-dvd: Fix 20bit decoding (bug/592)
   - avi: Improve non-interleaved detection (bug/666)
   - arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
   - arm: hpeldsp: prevent overreads in armv6 asm (bug/646)
   - avfilter: Add missing emms_c when needed
   - rtmpproto: Check the buffer sizes when copying app/playpath strings
   - swscale: Fix an undefined behaviour
   - vp9: Read the frame size as unsigned
   - dcadec: Use correct channel count in stereo downmix check
   - dcadec: Do not decode the XCh extension when downmixing to stereo
   - matroska: add the Opus mapping
   - matroskadec: read the CodecDelay element
   - rtmpproto: Make sure to pass on the error code if read_connect failed
   - lavr: allocate the resampling buffer with a positive size
   - mp3enc: Properly write bitrate value in XING header (Closes: #736088)
   - golomb: Fix the implementation of get_se_golomb_long
* Drop debian/libav-tools.maintscript. ffserver is no longer found in
  stable, and this seems to cause other problems today (Closes: #742676)

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
    s->frame_count   = 0;
395
395
    s->min_framesize = s->max_framesize;
396
396
 
397
 
#if FF_API_OLD_ENCODE_AUDIO
398
 
    avctx->coded_frame = avcodec_alloc_frame();
399
 
    if (!avctx->coded_frame)
400
 
        return AVERROR(ENOMEM);
401
 
#endif
402
 
 
403
397
    ret = ff_lpc_init(&s->lpc_ctx, avctx->frame_size,
404
398
                      s->options.max_prediction_order, FF_LPC_TYPE_LEVINSON);
405
399
 
1238
1232
 
1239
1233
    frame_bytes = encode_frame(s);
1240
1234
 
1241
 
    /* fallback to verbatim mode if the compressed frame is larger than it
 
1235
    /* Fall back on verbatim mode if the compressed frame is larger than it
1242
1236
       would be if encoded uncompressed. */
1243
1237
    if (frame_bytes < 0 || frame_bytes > s->max_framesize) {
1244
1238
        s->frame.verbatim_only = 1;
1285
1279
    }
1286
1280
    av_freep(&avctx->extradata);
1287
1281
    avctx->extradata_size = 0;
1288
 
#if FF_API_OLD_ENCODE_AUDIO
1289
 
    av_freep(&avctx->coded_frame);
1290
 
#endif
1291
1282
    return 0;
1292
1283
}
1293
1284
 
1327
1318
 
1328
1319
AVCodec ff_flac_encoder = {
1329
1320
    .name           = "flac",
 
1321
    .long_name      = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
1330
1322
    .type           = AVMEDIA_TYPE_AUDIO,
1331
1323
    .id             = AV_CODEC_ID_FLAC,
1332
1324
    .priv_data_size = sizeof(FlacEncodeContext),
1337
1329
    .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
1338
1330
                                                     AV_SAMPLE_FMT_S32,
1339
1331
                                                     AV_SAMPLE_FMT_NONE },
1340
 
    .long_name      = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
1341
1332
    .priv_class     = &flac_encoder_class,
1342
1333
};