Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package

char* av_strdup ( const char *  s  ) 

Duplicates the string s.

s string to be duplicated
Pointer to a newly allocated string containing a copy of s or NULL if the string cannot be allocated.

Definition at line 165 of file mem.c.

References av_malloc(), and NULL.

Referenced by av_set_string3(), and x11grab_read_header().

    char *ptr= NULL;
        int len = strlen(s) + 1;
        ptr = av_malloc(len);
        if (ptr)
            memcpy(ptr, s, len);
    return ptr;

Generated by  Doxygen 1.6.0   Back to index