Revision 946df059

View differences:

libavformat/rtpdec.c
471 471
    if (!st) {
472 472
        /* specific MPEG2TS demux support */
473 473
        ret = ff_mpegts_parse_packet(s->ts, pkt, buf, len);
474
        /* The only error that can be returned from ff_mpegts_parse_packet
475
         * is "no more data to return from the provided buffer", so return
476
         * AVERROR(EAGAIN) for all errors */
474 477
        if (ret < 0)
475
            return ret;
478
            return AVERROR(EAGAIN);
476 479
        if (ret < len) {
477 480
            s->read_buf_size = len - ret;
478 481
            memcpy(s->buf, buf + ret, s->read_buf_size);
......
634 637
            ret = ff_mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index,
635 638
                                      s->read_buf_size - s->read_buf_index);
636 639
            if (ret < 0)
637
                return ret;
640
                return AVERROR(EAGAIN);
638 641
            s->read_buf_index += ret;
639 642
            if (s->read_buf_index < s->read_buf_size)
640 643
                return 1;

Also available in: Unified diff