Revision 578688fa libavformat/utils.c

View differences:

libavformat/utils.c
1483 1483
    int64_t end_time;
1484 1484
    int64_t filesize, offset, duration;
1485 1485

  
1486
    av_read_frame_flush(ic);
1486
    /* free previous packet */
1487
    if (ic->cur_st && ic->cur_st->parser)
1488
        av_free_packet(&ic->cur_pkt);
1489
    ic->cur_st = NULL;
1490

  
1491
    /* flush packet queue */
1492
    flush_packet_queue(ic);
1493

  
1494
    for(i=0;i<ic->nb_streams;i++) {
1495
        st = ic->streams[i];
1496
        if (st->parser) {
1497
            av_parser_close(st->parser);
1498
            st->parser= NULL;
1499
        }
1500
    }
1487 1501

  
1488 1502
    /* we read the first packets to get the first PTS (not fully
1489 1503
       accurate, but it is enough now) */
......
2184 2198
    }
2185 2199

  
2186 2200
    if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && st->cur_dts >= pkt->dts){
2187
        av_log(NULL, AV_LOG_ERROR, "error, non monotone timestamps %"PRId64" >= %"PRId64" st:%d\n", st->cur_dts, pkt->dts, st->index);
2201
        av_log(NULL, AV_LOG_ERROR, "error, non monotone timestamps %"PRId64" >= %"PRId64"\n", st->cur_dts, pkt->dts);
2188 2202
        return -1;
2189 2203
    }
2190 2204
    if(pkt->dts != AV_NOPTS_VALUE && pkt->pts != AV_NOPTS_VALUE && pkt->pts < pkt->dts){
2191
        av_log(NULL, AV_LOG_ERROR, "error, pts < dts (%"PRId64" < %"PRId64")\n",
2192
               pkt->pts, pkt->dts);
2205
        av_log(NULL, AV_LOG_ERROR, "error, pts < dts\n");
2193 2206
        return -1;
2194 2207
    }
2195 2208

  

Also available in: Unified diff