On Mon, 12 Dec 2011 18:24:29 +0100, Luca Barbato <[email protected]> wrote:
> Fix the iformat/oformat typo and make the function behave if
> the context is already NULL.
> ---
> libavformat/utils.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 8b749ad..865edbc 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -3222,6 +3222,9 @@ int av_write_trailer(AVFormatContext *s)
> {
> int ret, i;
>
> + if (!s || !s->oformat)
> + return 0;
> +
Why would this ever happen?
> for(;;){
> AVPacket pkt;
> ret= interleave_packet(s, &pkt, NULL, 1);
> @@ -3247,7 +3250,7 @@ fail:
> av_freep(&s->streams[i]->priv_data);
> av_freep(&s->streams[i]->index_entries);
> }
> - if (s->iformat && s->iformat->priv_class)
> + if (s->oformat->priv_class)
This part is ok. I wonder what i was smoking when i wrote this.
--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel