mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Support PARSER_FLAG_COMPLETE_FRAMES for h261 and h263 parsers.
This commit is contained in:
parent
69f58958ce
commit
02e3f7d042
@ -70,12 +70,16 @@ static int h261_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= h261_find_frame_end(pc,avctx, buf, buf_size);
|
next= h261_find_frame_end(pc,avctx, buf, buf_size);
|
||||||
if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
|
if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
|
||||||
*poutbuf = NULL;
|
*poutbuf = NULL;
|
||||||
*poutbuf_size = 0;
|
*poutbuf_size = 0;
|
||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
*poutbuf = buf;
|
*poutbuf = buf;
|
||||||
*poutbuf_size = buf_size;
|
*poutbuf_size = buf_size;
|
||||||
return next;
|
return next;
|
||||||
|
@ -70,6 +70,9 @@ static int h263_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= ff_h263_find_frame_end(pc, buf, buf_size);
|
next= ff_h263_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) {
|
||||||
@ -77,6 +80,7 @@ static int h263_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;
|
||||||
|
Loading…
Reference in New Issue
Block a user