Mercurial > libavcodec.hg
comparison mjpeg_parser.c @ 10000:334d727f7f7a libavcodec
fix jpeg parser when PARSER_FLAG_COMPLETE_FRAMES is set
| author | bcoudurier |
|---|---|
| date | Sun, 02 Aug 2009 08:46:11 +0000 |
| parents | e9d9d946f213 |
| children | 944156621f05 |
comparison
equal
deleted
inserted
replaced
| 9999:c78fd9154378 | 10000:334d727f7f7a |
|---|---|
| 76 const uint8_t *buf, int buf_size) | 76 const uint8_t *buf, int buf_size) |
| 77 { | 77 { |
| 78 ParseContext *pc = s->priv_data; | 78 ParseContext *pc = s->priv_data; |
| 79 int next; | 79 int next; |
| 80 | 80 |
| 81 if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ | |
| 82 next= buf_size; | |
| 83 }else{ | |
| 81 next= find_frame_end(pc, buf, buf_size); | 84 next= find_frame_end(pc, buf, buf_size); |
| 82 | 85 |
| 83 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { | 86 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { |
| 84 *poutbuf = NULL; | 87 *poutbuf = NULL; |
| 85 *poutbuf_size = 0; | 88 *poutbuf_size = 0; |
| 86 return buf_size; | 89 return buf_size; |
| 90 } | |
| 87 } | 91 } |
| 88 | 92 |
| 89 *poutbuf = buf; | 93 *poutbuf = buf; |
| 90 *poutbuf_size = buf_size; | 94 *poutbuf_size = buf_size; |
| 91 return next; | 95 return next; |
