- // And open again for our audio context
- av_open_input_file( &self->audio_format, filename, NULL, 0, NULL );
- apply_properties( self->audio_format, properties, AV_OPT_FLAG_DECODING_PARAM );
-#if LIBAVFORMAT_VERSION_MAJOR > 52
- if ( self->audio_format->iformat && self->audio_format->iformat->priv_class && self->audio_format->priv_data )
- apply_properties( self->audio_format->priv_data, properties, AV_OPT_FLAG_DECODING_PARAM );
+ if ( self->seekable )
+ {
+ // And open again for our audio context
+ av_open_input_file( &self->audio_format, filename, NULL, 0, NULL );
+ apply_properties( self->audio_format, properties, AV_OPT_FLAG_DECODING_PARAM );
+#if LIBAVFORMAT_VERSION_MAJOR >= 53
+ if ( self->audio_format->iformat && self->audio_format->iformat->priv_class && self->audio_format->priv_data )
+ apply_properties( self->audio_format->priv_data, properties, AV_OPT_FLAG_DECODING_PARAM );