comparison au.c @ 820:feca73904e67 libavformat

changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
author michael
date Sun, 17 Jul 2005 22:24:36 +0000
parents c5077fdab490
children 66cc656ea404
comparison
equal deleted inserted replaced
819:a6c035e7f429 820:feca73904e67
61 ByteIOContext *pb = &s->pb; 61 ByteIOContext *pb = &s->pb;
62 62
63 s->priv_data = NULL; 63 s->priv_data = NULL;
64 64
65 /* format header */ 65 /* format header */
66 if (put_au_header(pb, &s->streams[0]->codec) < 0) { 66 if (put_au_header(pb, s->streams[0]->codec) < 0) {
67 return -1; 67 return -1;
68 } 68 }
69 69
70 put_flush_packet(pb); 70 put_flush_packet(pb);
71 71
141 141
142 /* now we are ready: build format streams */ 142 /* now we are ready: build format streams */
143 st = av_new_stream(s, 0); 143 st = av_new_stream(s, 0);
144 if (!st) 144 if (!st)
145 return -1; 145 return -1;
146 st->codec.codec_type = CODEC_TYPE_AUDIO; 146 st->codec->codec_type = CODEC_TYPE_AUDIO;
147 st->codec.codec_tag = id; 147 st->codec->codec_tag = id;
148 st->codec.codec_id = codec; 148 st->codec->codec_id = codec;
149 st->codec.channels = channels; 149 st->codec->channels = channels;
150 st->codec.sample_rate = rate; 150 st->codec->sample_rate = rate;
151 av_set_pts_info(st, 64, 1, rate); 151 av_set_pts_info(st, 64, 1, rate);
152 return 0; 152 return 0;
153 } 153 }
154 154
155 #define MAX_SIZE 4096 155 #define MAX_SIZE 4096