| 157 | } |
| 158 | |
| 159 | static int cavsvideo_parse(AVCodecParserContext *s, |
| 160 | AVCodecContext *avctx, |
| 161 | const uint8_t **poutbuf, int *poutbuf_size, |
| 162 | const uint8_t *buf, int buf_size) |
| 163 | { |
| 164 | ParseContext *pc = s->priv_data; |
| 165 | int next; |
| 166 | |
| 167 | if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ |
| 168 | next= buf_size; |
| 169 | }else{ |
| 170 | next= cavs_find_frame_end(pc, buf, buf_size); |
| 171 | |
| 172 | if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { |
| 173 | *poutbuf = NULL; |
| 174 | *poutbuf_size = 0; |
| 175 | return buf_size; |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | cavs_parse_frame(s, avctx, buf, buf_size); |
| 180 | |
| 181 | *poutbuf = buf; |
| 182 | *poutbuf_size = buf_size; |
| 183 | return next; |
| 184 | } |
| 185 | |
| 186 | const FFCodecParser ff_cavsvideo_parser = { |
| 187 | PARSER_CODEC_LIST(AV_CODEC_ID_CAVS), |
nothing calls this directly
no test coverage detected