mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-12 18:31:37 +00:00
Revert "avcodec/opus_parser: Handle complete frames flag."
This reverts commit 7e0df5910e
.
"complete frames" containers, even if they don't need to assemble
packets, still depended on this code for proper packet duration and
timestamp generation.
This commit is contained in:
parent
b8da7ba5ac
commit
35c84ae834
@ -170,24 +170,19 @@ static int opus_parse(AVCodecParserContext *ctx, AVCodecContext *avctx,
|
||||
ParseContext *pc = &s->pc;
|
||||
int next, header_len;
|
||||
|
||||
if (ctx->flags & PARSER_FLAG_COMPLETE_FRAMES) {
|
||||
next = buf_size;
|
||||
header_len = 0;
|
||||
} else {
|
||||
next = opus_find_frame_end(ctx, avctx, buf, buf_size, &header_len);
|
||||
next = opus_find_frame_end(ctx, avctx, buf, buf_size, &header_len);
|
||||
|
||||
if (s->ts_framing && next != AVERROR_INVALIDDATA &&
|
||||
ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
|
||||
*poutbuf = NULL;
|
||||
*poutbuf_size = 0;
|
||||
return buf_size;
|
||||
}
|
||||
if (s->ts_framing && next != AVERROR_INVALIDDATA &&
|
||||
ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
|
||||
*poutbuf = NULL;
|
||||
*poutbuf_size = 0;
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
if (next == AVERROR_INVALIDDATA){
|
||||
*poutbuf = NULL;
|
||||
*poutbuf_size = 0;
|
||||
return buf_size;
|
||||
}
|
||||
if (next == AVERROR_INVALIDDATA){
|
||||
*poutbuf = NULL;
|
||||
*poutbuf_size = 0;
|
||||
return buf_size;
|
||||
}
|
||||
|
||||
*poutbuf = buf + header_len;
|
||||
|
Loading…
Reference in New Issue
Block a user