Revision 01f4895c libavformat/movenc.c

View differences:

libavformat/movenc.c
1256 1256

  
1257 1257
static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)
1258 1258
{
1259
    int AudioRate = s->streams[1]->codec.sample_rate;
1260
    int FrameRate = ((s->streams[0]->codec.time_base.den) * (0x10000))/ (s->streams[0]->codec.time_base.num);
1259
    int AudioRate = s->streams[1]->codec->sample_rate;
1260
    int FrameRate = ((s->streams[0]->codec->time_base.den) * (0x10000))/ (s->streams[0]->codec->time_base.num);
1261 1261
 
1262 1262
    //printf("audiorate = %d\n",AudioRate);
1263
    //printf("framerate = %d / %d = 0x%x\n",s->streams[0]->codec.time_base.den,s->streams[0]->codec.time_base.num,FrameRate);
1263
    //printf("framerate = %d / %d = 0x%x\n",s->streams[0]->codec->time_base.den,s->streams[0]->codec->time_base.num,FrameRate);
1264 1264

  
1265 1265
    put_be32(pb, 0x94 ); /* size */
1266 1266
    put_tag(pb, "uuid");
......
1302 1302
    put_be32(pb, 0xc0 );
1303 1303
    put_be32(pb, FrameRate);  // was 0xefc29   
1304 1304
    put_be32(pb, FrameRate );  // was 0xefc29
1305
    put_be16(pb, s->streams[0]->codec.width);
1306
    put_be16(pb, s->streams[0]->codec.height);
1305
    put_be16(pb, s->streams[0]->codec->width);
1306
    put_be16(pb, s->streams[0]->codec->height);
1307 1307
    put_be32(pb, 0x010001 );
1308 1308
}
1309 1309

  
......
1314 1314
    int i;
1315 1315

  
1316 1316
    for(i=0; i<s->nb_streams; i++){
1317
        AVCodecContext *c= &s->streams[i]->codec;
1317
        AVCodecContext *c= s->streams[i]->codec;
1318 1318

  
1319 1319
        if      (c->codec_type == CODEC_TYPE_VIDEO){
1320 1320
            if (!codec_get_tag(codec_movvideo_tags, c->codec_id)){
......
1367 1367
{
1368 1368
    MOVContext *mov = s->priv_data;
1369 1369
    ByteIOContext *pb = &s->pb;
1370
    AVCodecContext *enc = &s->streams[pkt->stream_index]->codec;
1370
    AVCodecContext *enc = s->streams[pkt->stream_index]->codec;
1371 1371
    MOVTrack* trk = &mov->tracks[pkt->stream_index];
1372 1372
    int cl, id;
1373 1373
    unsigned int samplesInChunk = 0;

Also available in: Unified diff