Skip to content

Commit

Permalink
avformat/oggparseogm: sync avctx w/ codecpar
Browse files Browse the repository at this point in the history
Codec information may change while reading ogg packets. Update the
stream's internal avctx to match.
  • Loading branch information
chcunningham authored and jamrial committed Jun 25, 2019
1 parent 75d99e9 commit bb11584
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libavformat/oggparseogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ ogm_header(AVFormatContext *s, int idx)
bytestream2_get_buffer(&p, st->codecpar->extradata, st->codecpar->extradata_size);
}
}

// Update internal avctx with changes to codecpar above.
st->internal->need_context_update = 1;
} else if (bytestream2_peek_byte(&p) == 3) {
bytestream2_skip(&p, 7);
if (bytestream2_get_bytes_left(&p) > 1)
Expand Down

0 comments on commit bb11584

Please sign in to comment.