Changeset 024e5a2d in ffmpeg


Ignore:
Timestamp:
Jan 15, 2015, 8:20:18 AM (10 years ago)
Author:
Martin Storsjö <martin@martin.st>
Branches:
master
Children:
6e69bf4a, 89df3fd4
Parents:
def69553
git-author:
Martin Storsjö <martin@martin.st> (01/14/15 21:09:06)
git-committer:
Martin Storsjö <martin@martin.st> (01/15/15 08:20:18)
Message:

rtmppkt: Repeat the full 32 bit timestamp for chunking continuation packets

This fixes sending chunked packets (packets larger than the output
chunk size, which often can be e.g. 4096 bytes) with a timestamp delta
(or absolute timstamp, if it's a timestamp step backwards, or the
first packet of the stream) larger than 0xffffffff.

The RTMP spec explicitly says (in section 5.3.1.3.) that packets of
type 3 (continuation packets) should include this field, if the
previous non-continuation packet had it included.

The receiving code handles these packets correctly.

Pointed out by Cheolho Park.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libavformat/rtmppkt.c

    rdef69553 r024e5a2d  
    387387                return ret;
    388388            written++;
     389            if (pkt->ts_field == 0xFFFFFF) {
     390                uint8_t ts_header[4];
     391                AV_WB32(ts_header, timestamp);
     392                if ((ret = ffurl_write(h, ts_header, 4)) < 0)
     393                    return ret;
     394                written += 4;
     395            }
    389396        }
    390397    }
Note: See TracChangeset for help on using the changeset viewer.