@ -977,18 +977,19 @@ int ffio_fdopen(AVIOContext **s, URLContext *h)
( int ( * ) ( void * , uint8_t * , int ) ) ffurl_read ,
( int ( * ) ( void * , uint8_t * , int ) ) ffurl_read ,
( int ( * ) ( void * , uint8_t * , int ) ) ffurl_write ,
( int ( * ) ( void * , uint8_t * , int ) ) ffurl_write ,
( int64_t ( * ) ( void * , int64_t , int ) ) ffurl_seek ) ;
( int64_t ( * ) ( void * , int64_t , int ) ) ffurl_seek ) ;
if ( ! * s )
if ( ! * s ) {
goto fail ;
av_freep ( & buffer ) ;
return AVERROR ( ENOMEM ) ;
}
( * s ) - > protocol_whitelist = av_strdup ( h - > protocol_whitelist ) ;
( * s ) - > protocol_whitelist = av_strdup ( h - > protocol_whitelist ) ;
if ( ! ( * s ) - > protocol_whitelist & & h - > protocol_whitelist ) {
if ( ! ( * s ) - > protocol_whitelist & & h - > protocol_whitelist ) {
avio_closep ( s ) ;
avio_closep ( s ) ;
goto fail ;
return AVERROR ( ENOMEM ) ;
}
}
( * s ) - > protocol_blacklist = av_strdup ( h - > protocol_blacklist ) ;
( * s ) - > protocol_blacklist = av_strdup ( h - > protocol_blacklist ) ;
if ( ! ( * s ) - > protocol_blacklist & & h - > protocol_blacklist ) {
if ( ! ( * s ) - > protocol_blacklist & & h - > protocol_blacklist ) {
avio_closep ( s ) ;
avio_closep ( s ) ;
goto fail ;
return AVERROR ( ENOMEM ) ;
}
}
( * s ) - > direct = h - > flags & AVIO_FLAG_DIRECT ;
( * s ) - > direct = h - > flags & AVIO_FLAG_DIRECT ;
@ -1006,9 +1007,6 @@ int ffio_fdopen(AVIOContext **s, URLContext *h)
( ( FFIOContext * ) ( * s ) ) - > short_seek_get = ( int ( * ) ( void * ) ) ffurl_get_short_seek ;
( ( FFIOContext * ) ( * s ) ) - > short_seek_get = ( int ( * ) ( void * ) ) ffurl_get_short_seek ;
( * s ) - > av_class = & ff_avio_class ;
( * s ) - > av_class = & ff_avio_class ;
return 0 ;
return 0 ;
fail :
av_freep ( & buffer ) ;
return AVERROR ( ENOMEM ) ;
}
}
URLContext * ffio_geturlcontext ( AVIOContext * s )
URLContext * ffio_geturlcontext ( AVIOContext * s )