Revision c55806e3

View differences:

libavformat/avformat.h
604 604
#define AVFMT_FLAG_GENPTS       0x0001 ///< Generate missing pts even if it requires parsing future frames.
605 605
#define AVFMT_FLAG_IGNIDX       0x0002 ///< Ignore index.
606 606
#define AVFMT_FLAG_NONBLOCK     0x0004 ///< Do not block when reading packets from input.
607
#define AVFMT_FLAG_IGNDTS       0x0008 ///< Ignore DTS on frames that contain both DTS & PTS
607 608

  
608 609
    int loop_input;
609 610
    /** decoding: size of data to probe; encoding: unused. */
libavformat/options.c
46 46
{"fflags", NULL, OFFSET(flags), FF_OPT_TYPE_FLAGS, DEFAULT, INT_MIN, INT_MAX, D|E, "fflags"},
47 47
{"ignidx", "ignore index", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_IGNIDX, INT_MIN, INT_MAX, D, "fflags"},
48 48
{"genpts", "generate pts", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_GENPTS, INT_MIN, INT_MAX, D, "fflags"},
49
{"igndts", "ingore dts", 0, FF_OPT_TYPE_CONST, AVFMT_FLAG_IGNDTS, INT_MIN, INT_MAX, D, "fflags"},
49 50
#if LIBAVFORMAT_VERSION_INT < (53<<16)
50 51
{"track", " set the track number", OFFSET(track), FF_OPT_TYPE_INT, DEFAULT, 0, INT_MAX, E},
51 52
{"year", "set the year", OFFSET(year), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, E},
libavformat/utils.c
808 808
    int num, den, presentation_delayed, delay, i;
809 809
    int64_t offset;
810 810

  
811
    if((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
812
        pkt->dts= AV_NOPTS_VALUE;
813

  
811 814
    if (st->codec->codec_id != CODEC_ID_H264 && pc && pc->pict_type == FF_B_TYPE)
812 815
        //FIXME Set low_delay = 0 when has_b_frames = 1
813 816
        st->codec->has_b_frames = 1;

Also available in: Unified diff