Revision f87b1b37 libavformat/aviobuf.c

View differences:

libavformat/aviobuf.c
55 55
    s->buffer_size = buffer_size;
56 56
    s->buf_ptr = buffer;
57 57
    s->opaque = opaque;
58
    url_resetbuf(s, write_flag ? URL_WRONLY : URL_RDONLY);
58
    url_resetbuf(s, write_flag ? AVIO_WRONLY : AVIO_RDONLY);
59 59
    s->write_packet = write_packet;
60 60
    s->read_packet = read_packet;
61 61
    s->seek = seek;
......
845 845
    }
846 846

  
847 847
    if (ffio_init_context(*s, buffer, buffer_size,
848
                      (h->flags & URL_WRONLY || h->flags & URL_RDWR), h,
848
                      (h->flags & AVIO_WRONLY || h->flags & AVIO_RDWR), h,
849 849
                      ffurl_read, ffurl_write, ffurl_seek) < 0) {
850 850
        av_free(buffer);
851 851
        av_freep(s);
......
874 874
    s->buffer = buffer;
875 875
    s->buffer_size = buf_size;
876 876
    s->buf_ptr = buffer;
877
    url_resetbuf(s, s->write_flag ? URL_WRONLY : URL_RDONLY);
877
    url_resetbuf(s, s->write_flag ? AVIO_WRONLY : AVIO_RDONLY);
878 878
    return 0;
879 879
}
880 880

  
......
885 885
#endif
886 886
{
887 887
#if FF_API_URL_RESETBUF
888
    if (flags & URL_RDWR)
888
    if (flags & AVIO_RDWR)
889 889
        return AVERROR(EINVAL);
890 890
#else
891
    assert(flags == URL_WRONLY || flags == URL_RDONLY);
891
    assert(flags == AVIO_WRONLY || flags == AVIO_RDONLY);
892 892
#endif
893 893

  
894
    if (flags & URL_WRONLY) {
894
    if (flags & AVIO_WRONLY) {
895 895
        s->buf_end = s->buffer + s->buffer_size;
896 896
        s->write_flag = 1;
897 897
    } else {
......
1049 1049
    if(!*s)
1050 1050
        return AVERROR(ENOMEM);
1051 1051
    ret = ffio_init_context(*s, buf, buf_size,
1052
                        (flags & URL_WRONLY || flags & URL_RDWR),
1052
                        (flags & AVIO_WRONLY || flags & AVIO_RDWR),
1053 1053
                        NULL, NULL, NULL, NULL);
1054 1054
    if(ret != 0)
1055 1055
        av_freep(s);

Also available in: Unified diff