Commit 7a5c2853 authored by michael's avatar michael

10000l for myself, my last change was incomplete.

This one also reverts the libav mpeg ts regression test score change.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14132 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b3ef94a0
...@@ -627,7 +627,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, ...@@ -627,7 +627,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
AVStream *st= s->streams[stream_index]; AVStream *st= s->streams[stream_index];
AVPacketList *pktl= s->packet_buffer; AVPacketList *pktl= s->packet_buffer;
if(st->first_dts != AV_NOPTS_VALUE || dts == AV_NOPTS_VALUE) if(st->first_dts != AV_NOPTS_VALUE || dts == AV_NOPTS_VALUE || st->cur_dts == AV_NOPTS_VALUE)
return; return;
st->first_dts= dts - st->cur_dts; st->first_dts= dts - st->cur_dts;
...@@ -746,6 +746,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, ...@@ -746,6 +746,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
of the frame we are displaying, i.e. the last I- or P-frame */ of the frame we are displaying, i.e. the last I- or P-frame */
if (st->last_IP_duration == 0) if (st->last_IP_duration == 0)
st->last_IP_duration = pkt->duration; st->last_IP_duration = pkt->duration;
if(pkt->dts != AV_NOPTS_VALUE)
st->cur_dts = pkt->dts + st->last_IP_duration; st->cur_dts = pkt->dts + st->last_IP_duration;
st->last_IP_duration = pkt->duration; st->last_IP_duration = pkt->duration;
st->last_IP_pts= pkt->pts; st->last_IP_pts= pkt->pts;
...@@ -768,6 +769,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, ...@@ -768,6 +769,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
if(pkt->pts == AV_NOPTS_VALUE) if(pkt->pts == AV_NOPTS_VALUE)
pkt->pts = st->cur_dts; pkt->pts = st->cur_dts;
pkt->dts = pkt->pts; pkt->dts = pkt->pts;
if(pkt->pts != AV_NOPTS_VALUE)
st->cur_dts = pkt->pts + pkt->duration; st->cur_dts = pkt->pts + pkt->duration;
} }
} }
......
...@@ -11,7 +11,7 @@ bdb7484c68db722f66ba1630cf79844c *./tests/data/b-libav.mpg ...@@ -11,7 +11,7 @@ bdb7484c68db722f66ba1630cf79844c *./tests/data/b-libav.mpg
./tests/data/b-libav.mpg CRC=0x2b71a386 ./tests/data/b-libav.mpg CRC=0x2b71a386
447b005e527cf495ec13092e788f028d *./tests/data/b-libav.ts 447b005e527cf495ec13092e788f028d *./tests/data/b-libav.ts
471692 ./tests/data/b-libav.ts 471692 ./tests/data/b-libav.ts
./tests/data/b-libav.ts CRC=0xd14320e2 ./tests/data/b-libav.ts CRC=0xcc4948e1
d6fdeb9f7083cc827f9510c6c4517dc0 *./tests/data/b-libav.swf d6fdeb9f7083cc827f9510c6c4517dc0 *./tests/data/b-libav.swf
335771 ./tests/data/b-libav.swf 335771 ./tests/data/b-libav.swf
./tests/data/b-libav.swf CRC=0xe14e8847 ./tests/data/b-libav.swf CRC=0xe14e8847
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment