Revision 5d25d2a9 libavformat/asf.c

View differences:

libavformat/asf.c
878 878
    return 0;
879 879
}
880 880

  
881
static void asf_reset_header(AVFormatContext *s);
882

  
883
static int asf_read_close(AVFormatContext *s)
884
{
885
    int i;
886

  
887
    asf_reset_header(s);
888
    for(i=0;i<s->nb_streams;i++) {
889
        AVStream *st = s->streams[i];
890
        av_free(st->priv_data);
891
        av_free(st->codec->palctrl);
892
    }
893
    return 0;
894
}
895

  
896 881
// Added to support seeking after packets have been read
897 882
// If information is not reset, read_packet fails due to
898 883
// leftover information from previous reads
......
931 916
    asf->asf_st= NULL;
932 917
}
933 918

  
919
static int asf_read_close(AVFormatContext *s)
920
{
921
    int i;
922

  
923
    asf_reset_header(s);
924
    for(i=0;i<s->nb_streams;i++) {
925
        AVStream *st = s->streams[i];
926
        av_free(st->priv_data);
927
        av_free(st->codec->palctrl);
928
    }
929
    return 0;
930
}
931

  
934 932
static int64_t asf_read_pts(AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit)
935 933
{
936 934
    ASFContext *asf = s->priv_data;

Also available in: Unified diff