Revision 01f4895c libavformat/img2.c

View differences:

libavformat/img2.c
193 193
    }
194 194
    
195 195
    if(ap && ap->width && ap->height){
196
        st->codec.width = ap->width;
197
        st->codec.height= ap->height;
196
        st->codec->width = ap->width;
197
        st->codec->height= ap->height;
198 198
    }
199 199
    
200 200
    if (!s->is_pipe) {
......
209 209
    }
210 210
    
211 211
    if(ap->video_codec_id){
212
        st->codec.codec_type = CODEC_TYPE_VIDEO;
213
        st->codec.codec_id = ap->video_codec_id;
212
        st->codec->codec_type = CODEC_TYPE_VIDEO;
213
        st->codec->codec_id = ap->video_codec_id;
214 214
    }else if(ap->audio_codec_id){
215
        st->codec.codec_type = CODEC_TYPE_AUDIO;
216
        st->codec.codec_id = ap->audio_codec_id;
215
        st->codec->codec_type = CODEC_TYPE_AUDIO;
216
        st->codec->codec_id = ap->audio_codec_id;
217 217
    }else{
218
        st->codec.codec_type = CODEC_TYPE_VIDEO;
219
        st->codec.codec_id = av_str2id(img_tags, s->path);
218
        st->codec->codec_type = CODEC_TYPE_VIDEO;
219
        st->codec->codec_id = av_str2id(img_tags, s->path);
220 220
    }
221
    if(st->codec.codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
222
        st->codec.pix_fmt = ap->pix_fmt;
221
    if(st->codec->codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
222
        st->codec->pix_fmt = ap->pix_fmt;
223 223

  
224 224
    return 0;
225 225
}
......
231 231
    int i;
232 232
    int size[3]={0}, ret[3]={0};
233 233
    ByteIOContext f1[3], *f[3]= {&f1[0], &f1[1], &f1[2]};
234
    AVCodecContext *codec= &s1->streams[0]->codec;
234
    AVCodecContext *codec= s1->streams[0]->codec;
235 235

  
236 236
    if (!s->is_pipe) {
237 237
        /* loop over input */
......
314 314
    VideoData *img = s->priv_data;
315 315
    ByteIOContext pb1[3], *pb[3]= {&pb1[0], &pb1[1], &pb1[2]};
316 316
    char filename[1024];
317
    AVCodecContext *codec= &s->streams[ pkt->stream_index ]->codec;
317
    AVCodecContext *codec= s->streams[ pkt->stream_index ]->codec;
318 318
    int i;
319 319

  
320 320
    if (!img->is_pipe) {

Also available in: Unified diff