comparison dvbsub_parser.c @ 6977:de032bcdeff9 libavcodec

Simplify parser core.
author michael
date Mon, 02 Jun 2008 02:55:30 +0000
parents 48759bfbd073
children 04423b2f6e0b
comparison
equal deleted inserted replaced
6976:4e96557381d9 6977:de032bcdeff9
78 *poutbuf = NULL; 78 *poutbuf = NULL;
79 *poutbuf_size = 0; 79 *poutbuf_size = 0;
80 80
81 s->fetch_timestamp = 1; 81 s->fetch_timestamp = 1;
82 82
83 if (s->last_pts != s->pts && s->last_pts != AV_NOPTS_VALUE) /* Start of a new packet */ 83 if (s->last_pts != s->pts && s->pts != AV_NOPTS_VALUE) /* Start of a new packet */
84 { 84 {
85 if (pc->packet_index != pc->packet_start) 85 if (pc->packet_index != pc->packet_start)
86 { 86 {
87 #ifdef DEBUG 87 #ifdef DEBUG
88 av_log(avctx, AV_LOG_INFO, "Discarding %d bytes\n", 88 av_log(avctx, AV_LOG_INFO, "Discarding %d bytes\n",
173 { 173 {
174 *poutbuf = pc->packet_buf; 174 *poutbuf = pc->packet_buf;
175 pc->packet_start = *poutbuf_size; 175 pc->packet_start = *poutbuf_size;
176 } 176 }
177 177
178 if (s->last_pts == AV_NOPTS_VALUE) 178 if (s->pts == AV_NOPTS_VALUE)
179 s->last_pts = s->pts; 179 s->pts = s->last_pts;
180 180
181 return buf_size; 181 return buf_size;
182 } 182 }
183 183
184 static av_cold void dvbsub_parse_close(AVCodecParserContext *s) 184 static av_cold void dvbsub_parse_close(AVCodecParserContext *s)