Revision 72415b2a libavformat/avidec.c

View differences:

libavformat/avidec.c
442 442

  
443 443
            switch(tag1) {
444 444
            case MKTAG('v', 'i', 'd', 's'):
445
                codec_type = CODEC_TYPE_VIDEO;
445
                codec_type = AVMEDIA_TYPE_VIDEO;
446 446

  
447 447
                ast->sample_size = 0;
448 448
                break;
449 449
            case MKTAG('a', 'u', 'd', 's'):
450
                codec_type = CODEC_TYPE_AUDIO;
450
                codec_type = AVMEDIA_TYPE_AUDIO;
451 451
                break;
452 452
            case MKTAG('t', 'x', 't', 's'):
453 453
                //FIXME
454
                codec_type = CODEC_TYPE_DATA; //CODEC_TYPE_SUB ?  FIXME
454
                codec_type = AVMEDIA_TYPE_DATA; //AVMEDIA_TYPE_SUB ?  FIXME
455 455
                break;
456 456
            case MKTAG('d', 'a', 't', 's'):
457
                codec_type = CODEC_TYPE_DATA;
457
                codec_type = AVMEDIA_TYPE_DATA;
458 458
                break;
459 459
            default:
460 460
                av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1);
......
475 475
                    size = FFMIN(size, list_end - cur_pos);
476 476
                st = s->streams[stream_index];
477 477
                switch(codec_type) {
478
                case CODEC_TYPE_VIDEO:
478
                case AVMEDIA_TYPE_VIDEO:
479 479
                    if(amv_file_format){
480 480
                        st->codec->width=avih_width;
481 481
                        st->codec->height=avih_height;
482
                        st->codec->codec_type = CODEC_TYPE_VIDEO;
482
                        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
483 483
                        st->codec->codec_id = CODEC_ID_AMV;
484 484
                        url_fskip(pb, size);
485 485
                        break;
......
497 497
                    get_le32(pb); /* ClrImportant */
498 498

  
499 499
                    if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {
500
                        st->codec->codec_type = CODEC_TYPE_SUBTITLE;
500
                        st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
501 501
                        st->codec->codec_tag = tag1;
502 502
                        st->codec->codec_id = CODEC_ID_XSUB;
503 503
                        break;
......
534 534
#ifdef DEBUG
535 535
                    print_tag("video", tag1, 0);
536 536
#endif
537
                    st->codec->codec_type = CODEC_TYPE_VIDEO;
537
                    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
538 538
                    st->codec->codec_tag = tag1;
539 539
                    st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1);
540 540
                    st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts.
......
554 554

  
555 555
//                    url_fskip(pb, size - 5 * 4);
556 556
                    break;
557
                case CODEC_TYPE_AUDIO:
557
                case AVMEDIA_TYPE_AUDIO:
558 558
                    ff_get_wav_header(pb, st->codec, size);
559 559
                    if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){
560 560
                        av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align);
......
580 580
                        st->codec->codec_id  = CODEC_ID_ADPCM_IMA_AMV;
581 581
                    break;
582 582
                default:
583
                    st->codec->codec_type = CODEC_TYPE_DATA;
583
                    st->codec->codec_type = AVMEDIA_TYPE_DATA;
584 584
                    st->codec->codec_id= CODEC_ID_NONE;
585 585
                    st->codec->codec_tag= 0;
586 586
                    url_fskip(pb, size);
......
787 787
//av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
788 788
            pkt->stream_index = avi->stream_index;
789 789

  
790
            if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
790
            if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
791 791
                AVIndexEntry *e;
792 792
                int index;
793 793
                assert(st->index_entries);
......
871 871
                //workaround for broken small-file-bug402.avi
872 872
                if(   d[2] == 'w' && d[3] == 'b'
873 873
                   && n==0
874
                   && st ->codec->codec_type == CODEC_TYPE_VIDEO
875
                   && st1->codec->codec_type == CODEC_TYPE_AUDIO
874
                   && st ->codec->codec_type == AVMEDIA_TYPE_VIDEO
875
                   && st1->codec->codec_type == AVMEDIA_TYPE_AUDIO
876 876
                   && ast->prefix == 'd'*256+'c'
877 877
                   && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count)
878 878
                  ){

Also available in: Unified diff