Revision 6b474953 ffmpeg.c

View differences:

ffmpeg.c
1539 1539
                    decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
1540 1540
                    /* XXX: allocate picture correctly */
1541 1541
                    avcodec_get_frame_defaults(&picture);
1542
                    ist->st->codec->reordered_opaque = pkt_pts;
1542
                    avpkt.pts = pkt_pts;
1543
                    avpkt.dts = ist->pts;
1543 1544
                    pkt_pts = AV_NOPTS_VALUE;
1544 1545

  
1545 1546
                    ret = avcodec_decode_video2(ist->st->codec,
......
1551 1552
                        /* no picture yet */
1552 1553
                        goto discard_packet;
1553 1554
                    }
1554
                    ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.reordered_opaque, ist->pts);
1555
                    ist->next_pts = ist->pts = guess_correct_pts(&ist->pts_ctx, picture.pkt_pts, picture.pkt_dts);
1555 1556
                    if (ist->st->codec->time_base.num != 0) {
1556 1557
                        int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
1557 1558
                        ist->next_pts += ((int64_t)AV_TIME_BASE *

Also available in: Unified diff