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

« back to all changes in this revision

Viewing changes to libavformat/sol.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:
23
23
 * Based on documents from Game Audio Player and own research
24
24
 */
25
25
 
 
26
#include "libavutil/channel_layout.h"
26
27
#include "libavutil/intreadwrite.h"
27
28
#include "avformat.h"
28
29
#include "internal.h"
116
117
    st->codec->codec_tag = id;
117
118
    st->codec->codec_id = codec;
118
119
    st->codec->channels = channels;
 
120
    st->codec->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
 
121
                                                AV_CH_LAYOUT_STEREO;
119
122
    st->codec->sample_rate = rate;
120
123
    avpriv_set_pts_info(st, 64, 1, rate);
121
124
    return 0;