OLD | NEW |
(Empty) | |
| 1 diff -wurp -N orig/libavformat/oggdec.c ffmpeg-mt/libavformat/oggdec.c |
| 2 --- orig/libavformat/oggdec.c 2011-02-25 03:23:22.663626821 -0800 |
| 3 +++ ffmpeg-mt/libavformat/oggdec.c 2011-02-25 07:30:11.045572658 -0800 |
| 4 @@ -610,10 +610,9 @@ ogg_read_timestamp (AVFormatContext * s, |
| 5 int64_t pos_limit) |
| 6 { |
| 7 struct ogg *ogg = s->priv_data; |
| 8 - struct ogg_stream *os = ogg->streams + stream_index; |
| 9 ByteIOContext *bc = s->pb; |
| 10 int64_t pts = AV_NOPTS_VALUE; |
| 11 - int i; |
| 12 + int i = -1; |
| 13 int packet = 0; |
| 14 int64_t start_pos = *pos_arg; |
| 15 url_fseek(bc, *pos_arg, SEEK_SET); |
| 16 @@ -621,6 +620,7 @@ ogg_read_timestamp (AVFormatContext * s, |
| 17 |
| 18 while (url_ftell(bc) < pos_limit && !ogg_packet(s, &i, NULL, NULL, pos_arg)
) { |
| 19 if (i == stream_index) { |
| 20 + struct ogg_stream *os = ogg->streams + stream_index; |
| 21 pts = ogg_calc_pts(s, i, NULL); |
| 22 if (os->keyframe_seek && !(os->pflags & AV_PKT_FLAG_KEY)) |
| 23 pts = AV_NOPTS_VALUE; |
| 24 @@ -655,12 +655,14 @@ static int ogg_read_seek(AVFormatContext |
| 25 os->keyframe_seek = 1; |
| 26 |
| 27 ret = av_seek_frame_binary(s, stream_index, timestamp, flags); |
| 28 + os = ogg->streams + stream_index; |
| 29 if (ret < 0) |
| 30 os->keyframe_seek = 0; |
| 31 |
| 32 // Save the position seeked to. |
| 33 pos_arg = seek_pos = url_ftell(s->pb); |
| 34 seek_pts = ogg_read_timestamp(s, stream_index, &pos_arg, url_fsize(s->pb)); |
| 35 + os = ogg->streams + stream_index; |
| 36 |
| 37 // Since we have seeked to the beginning then reset lastpts and lastdts to
0. |
| 38 if (!seek_pts) { |
OLD | NEW |