Revision 3a86d3f6 libavformat/movenc.c

View differences:

libavformat/movenc.c
1758 1758
                track->height = track->tag>>24 == 'n' ? 486 : 576;
1759 1759
            }
1760 1760
            track->timescale = st->codec->time_base.den;
1761
            av_set_pts_info(st, 64, 1, st->codec->time_base.den);
1762 1761
            if (track->mode == MODE_MOV && track->timescale > 100000)
1763 1762
                av_log(s, AV_LOG_WARNING,
1764 1763
                       "WARNING codec timebase is very high. If duration is too long,\n"
......
1766 1765
                       "or choose different container.\n");
1767 1766
        }else if(st->codec->codec_type == CODEC_TYPE_AUDIO){
1768 1767
            track->timescale = st->codec->sample_rate;
1769
            av_set_pts_info(st, 64, 1, st->codec->sample_rate);
1770 1768
            if(!st->codec->frame_size && !av_get_bits_per_sample(st->codec->codec_id)) {
1771 1769
                av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i);
1772 1770
                goto error;
......
1784 1782
            }
1785 1783
        }else if(st->codec->codec_type == CODEC_TYPE_SUBTITLE){
1786 1784
            track->timescale = st->codec->time_base.den;
1787
            av_set_pts_info(st, 64, 1, st->codec->time_base.den);
1788 1785
        }
1789 1786
        if (!track->height)
1790 1787
            track->height = st->codec->height;
1788

  
1789
        av_set_pts_info(st, 64, 1, track->timescale);
1791 1790
    }
1792 1791

  
1793 1792
    mov_write_mdat_tag(pb, mov);

Also available in: Unified diff