static int hls_write_trailer(struct AVFormatContext *s)

{

    HLSContext *hls = s->priv_data;

    AVFormatContext *oc = hls->avf;



    av_write_trailer(oc);

    avio_closep(&oc->pb);

    avformat_free_context(oc);

    av_free(hls->basename);

    append_entry(hls, hls->duration);

    hls_window(s, 1);



    free_entries(hls);

    return 0;

}

static int hls_write_trailer(struct AVFormatContext *s)

{

    HLSContext *hls = s->priv_data;

    AVFormatContext *oc = hls->avf;



    av_write_trailer(oc);

    avio_closep(&oc->pb);

    avformat_free_context(oc);

    av_free(hls->basename);

    append_entry(hls, hls->duration);

    hls_window(s, 1);



    free_entries(hls);

    return 0;

}

static int FUNC_0(struct AVFormatContext *VAR_0)

{

    HLSContext *hls = VAR_0->priv_data;

    AVFormatContext *VAR_1 = hls->avf;



    av_write_trailer(VAR_1);

    avio_closep(&VAR_1->pb);

    avformat_free_context(VAR_1);

    av_free(hls->basename);

    append_entry(hls, hls->duration);

    hls_window(VAR_0, 1);



    free_entries(hls);

    return 0;

}

static int FUNC_0(struct AVFormatContext *VAR_0)
{ HLSContext *hls = VAR_0->priv_data; AVFormatContext *VAR_1 = hls->avf; av_write_trailer(VAR_1); avio_closep(&VAR_1->pb); avformat_free_context(VAR_1); av_free(hls->basename); append_entry(hls, hls->duration); hls_window(VAR_0, 1); free_entries(hls); return 0; }