Revision fd0ae17a

View differences:

ffmpeg.c
1549 1549
                    decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
1550 1550
                    /* XXX: allocate picture correctly */
1551 1551
                    avcodec_get_frame_defaults(&picture);
1552
                    ist->st->codec->reordered_opaque = pkt_pts;
1552
                    avpkt.pts = pkt_pts;
1553
                    avpkt.dts = ist->pts;
1553 1554
                    pkt_pts = AV_NOPTS_VALUE;
1554 1555

  
1555 1556
                    ret = avcodec_decode_video2(ist->st->codec,
......
1561 1562
                        /* no picture yet */
1562 1563
                        goto discard_packet;
1563 1564
                    }
1564
                    ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.reordered_opaque, ist->pts);
1565
                    ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.pkt_pts, picture.pkt_dts);
1565 1566
                    if (ist->st->codec->time_base.num != 0) {
1566 1567
                        int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
1567 1568
                        ist->next_pts += ((int64_t)AV_TIME_BASE *
ffplay.c
1576 1576

  
1577 1577
    if (got_picture) {
1578 1578
        if (decoder_reorder_pts == -1) {
1579
            *pts = guess_correct_pts(&is->pts_ctx, frame->pkt_pts, pkt->dts);
1579
            *pts = guess_correct_pts(&is->pts_ctx, frame->pkt_pts, frame->pkt_dts);
1580 1580
        } else if (decoder_reorder_pts) {
1581 1581
            *pts = frame->pkt_pts;
1582 1582
        } else {
1583
            *pts = pkt->dts;
1583
            *pts = frame->pkt_dts;
1584 1584
        }
1585 1585

  
1586 1586
        if (*pts == AV_NOPTS_VALUE) {

Also available in: Unified diff