Mercurial > libavcodec.hg
comparison parser.c @ 6982:abe4c0ba1be7 libavcodec
unused variable
| author | michael |
|---|---|
| date | Mon, 02 Jun 2008 13:01:23 +0000 |
| parents | ddbc1767b7cd |
| children | 29a10e3232d8 |
comparison
equal
deleted
inserted
replaced
| 6981:e897f60e5048 | 6982:abe4c0ba1be7 |
|---|---|
| 104 AVCodecContext *avctx, | 104 AVCodecContext *avctx, |
| 105 uint8_t **poutbuf, int *poutbuf_size, | 105 uint8_t **poutbuf, int *poutbuf_size, |
| 106 const uint8_t *buf, int buf_size, | 106 const uint8_t *buf, int buf_size, |
| 107 int64_t pts, int64_t dts) | 107 int64_t pts, int64_t dts) |
| 108 { | 108 { |
| 109 int index, i, k; | 109 int index, i; |
| 110 uint8_t dummy_buf[FF_INPUT_BUFFER_PADDING_SIZE]; | 110 uint8_t dummy_buf[FF_INPUT_BUFFER_PADDING_SIZE]; |
| 111 | 111 |
| 112 if (buf_size == 0) { | 112 if (buf_size == 0) { |
| 113 /* padding is always necessary even if EOF, so we add it here */ | 113 /* padding is always necessary even if EOF, so we add it here */ |
| 114 memset(dummy_buf, 0, sizeof(dummy_buf)); | 114 memset(dummy_buf, 0, sizeof(dummy_buf)); |
| 115 buf = dummy_buf; | 115 buf = dummy_buf; |
| 116 } else { | 116 } else { |
| 117 /* add a new packet descriptor */ | 117 /* add a new packet descriptor */ |
| 118 k = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); | 118 i = (s->cur_frame_start_index + 1) & (AV_PARSER_PTS_NB - 1); |
| 119 s->cur_frame_start_index = k; | 119 s->cur_frame_start_index = i; |
| 120 s->cur_frame_offset[k] = s->cur_offset; | 120 s->cur_frame_offset[i] = s->cur_offset; |
| 121 s->cur_frame_end[k] = s->cur_offset + buf_size; | 121 s->cur_frame_end[i] = s->cur_offset + buf_size; |
| 122 s->cur_frame_pts[k] = pts; | 122 s->cur_frame_pts[i] = pts; |
| 123 s->cur_frame_dts[k] = dts; | 123 s->cur_frame_dts[i] = dts; |
| 124 } | 124 } |
| 125 | 125 |
| 126 if (s->fetch_timestamp){ | 126 if (s->fetch_timestamp){ |
| 127 s->fetch_timestamp=0; | 127 s->fetch_timestamp=0; |
| 128 s->last_pts = s->pts; | 128 s->last_pts = s->pts; |
