Browse Source

mpegts: fix pos47_full

The value was off by a packet

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 11 years ago
parent
commit
0f2f65bd58
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavformat/mpegts.c

+ 3
- 2
libavformat/mpegts.c View File

@@ -1862,7 +1862,8 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
return 0;

pos = avio_tell(ts->stream->pb);
ts->pos47_full = pos;
av_assert0(pos >= TS_PACKET_SIZE);
ts->pos47_full = pos - TS_PACKET_SIZE;

if (tss->type == MPEGTS_SECTION) {
if (is_start) {
@@ -1910,7 +1911,7 @@ static void reanalyze(MpegTSContext *ts) {
int64_t pos = avio_tell(pb);
if(pos < 0)
return;
pos += ts->raw_packet_size - ts->pos47_full;
pos -= ts->pos47_full;
if (pos == TS_PACKET_SIZE) {
ts->size_stat[0] ++;
} else if (pos == TS_DVHS_PACKET_SIZE) {


Loading…
Cancel
Save