50         for(i=0; i<buf_size;){
 
   51             state= (state<<8) | buf[i];
 
   52             if(state>=0xFFC00000 && state<=0xFFFEFFFF){
 
   53                 if(state>=0xFFD80000 && state<=0xFFD8FFFF){
 
   57                 }
else if(state<0xFFD00000 || state>0xFFD9FFFF){
 
   58                     m->
size= (state&0xFFFF)-1;
 
   77             state= (state<<8) | buf[i];
 
   78             if(state>=0xFFC00000 && state<=0xFFFEFFFF){
 
   79                 if(state>=0xFFD80000 && state<=0xFFD8FFFF){
 
   83                 } 
else if(state<0xFFD00000 || state>0xFFD9FFFF){
 
   84                     m->
size= (state&0xFFFF)-1;
 
  104                       const uint8_t **poutbuf, 
int *poutbuf_size,
 
  124     *poutbuf_size = buf_size;
 
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame. 
 
#define PARSER_FLAG_COMPLETE_FRAMES
 
void ff_parse_close(AVCodecParserContext *s)
 
static int find_frame_end(MJPEGParserContext *m, const uint8_t *buf, int buf_size)
Find the end of the current frame in the bitstream. 
 
main external API structure. 
 
uint32_t state
contains the last few bytes in MSB order 
 
static int jpeg_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 
AVCodecParser ff_mjpeg_parser