Revision 6a058d90

View differences:

libavformat/mpegenc.c
478 478
    return AVERROR(ENOMEM);
479 479
}
480 480

  
481
void ff_mpeg_put_ts(ByteIOContext *pb, int id, int64_t timestamp)
481
static inline void put_timestamp(ByteIOContext *pb, int id, int64_t timestamp)
482 482
{
483 483
    put_byte(pb,
484 484
             (id << 4) |
......
856 856
            put_byte(&ctx->pb, header_len - 3 + stuffing_size);
857 857

  
858 858
            if (pes_flags & 0x80)  /*write pts*/
859
                ff_mpeg_put_ts(&ctx->pb, (pes_flags & 0x40) ? 0x03 : 0x02, pts);
859
                put_timestamp(&ctx->pb, (pes_flags & 0x40) ? 0x03 : 0x02, pts);
860 860
            if (pes_flags & 0x40)  /*write dts*/
861
                ff_mpeg_put_ts(&ctx->pb, 0x01, dts);
861
                put_timestamp(&ctx->pb, 0x01, dts);
862 862

  
863 863
            if (pes_flags & 0x01) {  /*write pes extension*/
864 864
                put_byte(&ctx->pb, 0x10); /* flags */
......
873 873
        } else {
874 874
            if (pts != AV_NOPTS_VALUE) {
875 875
                if (dts != pts) {
876
                    ff_mpeg_put_ts(&ctx->pb, 0x03, pts);
877
                    ff_mpeg_put_ts(&ctx->pb, 0x01, dts);
876
                    put_timestamp(&ctx->pb, 0x03, pts);
877
                    put_timestamp(&ctx->pb, 0x01, dts);
878 878
                } else {
879
                    ff_mpeg_put_ts(&ctx->pb, 0x02, pts);
879
                    put_timestamp(&ctx->pb, 0x02, pts);
880 880
                }
881 881
            } else {
882 882
                put_byte(&ctx->pb, 0x0f);

Also available in: Unified diff