rtmppkt.c (libav-12) | : | rtmppkt.c (libav-12.1) | ||
---|---|---|---|---|
skipping to change at line 238 | skipping to change at line 238 | |||
if (ts_field == 0xFFFFFF) { | if (ts_field == 0xFFFFFF) { | |||
if (ffurl_read_complete(h, buf, 4) != 4) | if (ffurl_read_complete(h, buf, 4) != 4) | |||
return AVERROR(EIO); | return AVERROR(EIO); | |||
timestamp = AV_RB32(buf); | timestamp = AV_RB32(buf); | |||
} else { | } else { | |||
timestamp = ts_field; | timestamp = ts_field; | |||
} | } | |||
if (hdr != RTMP_PS_TWELVEBYTES) | if (hdr != RTMP_PS_TWELVEBYTES) | |||
timestamp += prev_pkt[channel_id].timestamp; | timestamp += prev_pkt[channel_id].timestamp; | |||
if (prev_pkt[channel_id].read && size != prev_pkt[channel_id].size) { | ||||
av_log(h, AV_LOG_ERROR, "RTMP packet size mismatch %d != %d\n", | ||||
size, prev_pkt[channel_id].size); | ||||
ff_rtmp_packet_destroy(&prev_pkt[channel_id]); | ||||
prev_pkt[channel_id].read = 0; | ||||
return AVERROR_INVALIDDATA; | ||||
} | ||||
if (!prev_pkt[channel_id].read) { | if (!prev_pkt[channel_id].read) { | |||
if ((ret = ff_rtmp_packet_create(p, channel_id, type, timestamp, | if ((ret = ff_rtmp_packet_create(p, channel_id, type, timestamp, | |||
size)) < 0) | size)) < 0) | |||
return ret; | return ret; | |||
p->read = written; | p->read = written; | |||
p->offset = 0; | p->offset = 0; | |||
prev_pkt[channel_id].ts_field = ts_field; | prev_pkt[channel_id].ts_field = ts_field; | |||
prev_pkt[channel_id].timestamp = timestamp; | prev_pkt[channel_id].timestamp = timestamp; | |||
} else { | } else { | |||
// previous packet in this channel hasn't completed reading | // previous packet in this channel hasn't completed reading | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 8 lines changed or added |