Commit b0d1b8b7 authored by bcoudurier's avatar bcoudurier

fix jpeg parser when PARSER_FLAG_COMPLETE_FRAMES is set

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19558 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 286d8e67
...@@ -78,6 +78,9 @@ static int jpeg_parse(AVCodecParserContext *s, ...@@ -78,6 +78,9 @@ static int jpeg_parse(AVCodecParserContext *s,
ParseContext *pc = s->priv_data; ParseContext *pc = s->priv_data;
int next; int next;
if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
next= buf_size;
}else{
next= find_frame_end(pc, buf, buf_size); next= find_frame_end(pc, buf, buf_size);
if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
...@@ -85,6 +88,7 @@ static int jpeg_parse(AVCodecParserContext *s, ...@@ -85,6 +88,7 @@ static int jpeg_parse(AVCodecParserContext *s,
*poutbuf_size = 0; *poutbuf_size = 0;
return buf_size; return buf_size;
} }
}
*poutbuf = buf; *poutbuf = buf;
*poutbuf_size = buf_size; *poutbuf_size = buf_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment