// Open the output file, if needed
if ( !( fmt->flags & AVFMT_NOFILE ) )
{
- if ( url_fopen( &oc->pb, filename, URL_WRONLY ) < 0 )
+#if LIBAVFORMAT_VERSION_MAJOR > 52
+ if ( avio_open( &oc->pb, filename, AVIO_FLAG_WRITE ) < 0 )
+#else
+ if ( url_fopen( &oc->pb, filename, URL_WRONLY ) < 0 )
+#endif
{
mlt_log_error( MLT_CONSUMER_SERVICE( consumer ), "Could not open '%s'\n", filename );
mlt_properties_set_int( properties, "running", 0 );
// Close the output file
if ( !( fmt->flags & AVFMT_NOFILE ) )
-#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
+#if LIBAVFORMAT_VERSION_MAJOR > 52
+ avio_close( oc->pb );
+#elif LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
url_fclose( oc->pb );
#else
url_fclose( &oc->pb );
int av = 0;
// Only if there is not a protocol specification that avformat can handle
+#if LIBAVFORMAT_VERSION_MAJOR > 52
+ if ( mrl && !avio_check( file, 0 ) )
+#else
if ( mrl && !url_exist( file ) )
+#endif
{
// 'file' becomes format abbreviation
mrl[0] = 0;
if ( context->pb )
{
// protocols can indicate if they support seeking
+#if LIBAVFORMAT_VERSION_MAJOR > 52
+ self->seekable = context->pb->seekable;
+#else
URLContext *uc = url_fileno( context->pb );
if ( uc )
self->seekable = !uc->is_streamed;
+#endif
}
if ( self->seekable )
{