~ubuntu-branches/ubuntu/utopic/libav/utopic

« back to all changes in this revision

Viewing changes to libavcodec/truespeech.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-12-21 15:32:13 UTC
  • mto: (1.2.18)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20121221153213-fudzrugjzivtv0wp
Tags: upstream-9~beta3
ImportĀ upstreamĀ versionĀ 9~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
20
 */
21
21
 
 
22
#include "libavutil/channel_layout.h"
22
23
#include "libavutil/intreadwrite.h"
23
24
#include "avcodec.h"
24
25
#include "dsputil.h"
25
26
#include "get_bits.h"
 
27
#include "internal.h"
26
28
 
27
29
#include "truespeech_data.h"
28
30
/**
66
68
        return AVERROR(EINVAL);
67
69
    }
68
70
 
69
 
    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
 
71
    avctx->channel_layout = AV_CH_LAYOUT_MONO;
 
72
    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
70
73
 
71
74
    ff_dsputil_init(&c->dsp, avctx);
72
75
 
325
328
 
326
329
    /* get output buffer */
327
330
    c->frame.nb_samples = iterations * 240;
328
 
    if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
 
331
    if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
329
332
        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
330
333
        return ret;
331
334
    }