[FFmpeg-devel] [PATCH] avformat/oggparseogm: sync avctx w/ codecpar

Chris Cunningham chcunningham at chromium.org
Thu Feb 7 03:16:12 EET 2019


This is a follow up to feedback in
http://ffmpeg.org/pipermail/ffmpeg-devel/2019-February/239751.html

On Wed, Feb 6, 2019 at 5:13 PM chcunningham <chcunningham at chromium.org>
wrote:

> Codec information may change while reading ogg packets. Update the
> stream's internal avctx to match.
> ---
>  libavformat/oggparseogm.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
> index a07453760b..b07a5d55ba 100644
> --- a/libavformat/oggparseogm.c
> +++ b/libavformat/oggparseogm.c
> @@ -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)
> --
> 2.20.1.611.gfbb209baf1-goog
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list