Mercurial > libavcodec.hg
comparison parser.c @ 12529:9a3f2beae2a9 libavcodec
Fix index_entries pos:
It was being set wrong for files with data_offset > 0
Patch by Michael Chinen, mchinen gmail
| author | cehoyos |
|---|---|
| date | Mon, 27 Sep 2010 22:17:58 +0000 |
| parents | c70e2fd8f35d |
| children |
comparison
equal
deleted
inserted
replaced
| 12528:f4caff0e1e10 | 12529:9a3f2beae2a9 |
|---|---|
| 148 int64_t pos) | 148 int64_t pos) |
| 149 { | 149 { |
| 150 int index, i; | 150 int index, i; |
| 151 uint8_t dummy_buf[FF_INPUT_BUFFER_PADDING_SIZE]; | 151 uint8_t dummy_buf[FF_INPUT_BUFFER_PADDING_SIZE]; |
| 152 | 152 |
| 153 if(!(s->flags & PARSER_FLAG_FETCHED_OFFSET)) { | |
| 154 s->next_frame_offset = | |
| 155 s->cur_offset = pos; | |
| 156 s->flags |= PARSER_FLAG_FETCHED_OFFSET; | |
| 157 } | |
| 158 | |
| 153 if (buf_size == 0) { | 159 if (buf_size == 0) { |
| 154 /* padding is always necessary even if EOF, so we add it here */ | 160 /* padding is always necessary even if EOF, so we add it here */ |
| 155 memset(dummy_buf, 0, sizeof(dummy_buf)); | 161 memset(dummy_buf, 0, sizeof(dummy_buf)); |
| 156 buf = dummy_buf; | 162 buf = dummy_buf; |
| 157 } else if (s->cur_offset + buf_size != | 163 } else if (s->cur_offset + buf_size != |
