History

Revert "avcodec/opus_parser: Handle complete frames flag."

This reverts commit 7e0df5910ec0f107cd0700d6b9359d29177f1933. "complete frames" containers, even if they don't need to assemble packets, still depended on this code for proper packet duration and timestamp generation.

James Almer committed 8 years ago

Commit 35c84ae1 parent b8da7ba1 file · +12 −17Browse files

Unified · Split

libavcodec/opus_parser.c+12−17
@@ -170,24 +170,19 @@ static int opus_parse(AVCodecParserContext *ctx, AVCodecContext *avctx, · 169 unmodified lines
170170 ParseContext *pc = &s->pc;
171171 int next, header_len;
172172
173− if (ctx->flags & PARSER_FLAG_COMPLETE_FRAMES) {
174− next = buf_size;
175− header_len = 0;
176− } else {
177− next = opus_find_frame_end(ctx, avctx, buf, buf_size, &header_len);
178−
179− if (s->ts_framing && next != AVERROR_INVALIDDATA &&
180− ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
181− *poutbuf = NULL;
182− *poutbuf_size = 0;
183− return buf_size;
184− }
173+ next = opus_find_frame_end(ctx, avctx, buf, buf_size, &header_len);
185174
186− if (next == AVERROR_INVALIDDATA){
187− *poutbuf = NULL;
188− *poutbuf_size = 0;
189− return buf_size;
190− }
175+ if (s->ts_framing && next != AVERROR_INVALIDDATA &&
176+ ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
177+ *poutbuf = NULL;
178+ *poutbuf_size = 0;
179+ return buf_size;
180+ }
181+
182+ if (next == AVERROR_INVALIDDATA){
183+ *poutbuf = NULL;
184+ *poutbuf_size = 0;
185+ return buf_size;
191186 }
192187
193188 *poutbuf = buf + header_len;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t