Browse Source

decoder: move decoder_UpdateVideoFormat() into a function

It is going to do a lot more in push with the video context.
pull/85/head
Steve Lhomme 8 years ago
parent
commit
cf3deae584
  1. 11
      include/vlc_codec.h
  2. 9
      src/input/decoder_helpers.c
  3. 1
      src/libvlccore.sym

11
include/vlc_codec.h

@ -267,16 +267,7 @@ struct encoder_t
*
* @return 0 if the video output was set up successfully, -1 otherwise.
*/
VLC_USED
static inline int decoder_UpdateVideoFormat( decoder_t *dec )
{
vlc_assert( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs != NULL );
if( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs->video.format_update != NULL )
return dec->cbs->video.format_update( dec );
else
return -1;
}
VLC_API int decoder_UpdateVideoFormat( decoder_t *dec );
/**
* Allocates an output picture buffer.

9
src/input/decoder_helpers.c

@ -71,3 +71,12 @@ void decoder_Destroy( decoder_t *p_dec )
vlc_object_release( p_dec );
}
}
int decoder_UpdateVideoFormat( decoder_t *dec )
{
vlc_assert( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs != NULL );
if( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs->video.format_update != NULL )
return dec->cbs->video.format_update( dec );
return -1;
}

1
src/libvlccore.sym

@ -78,6 +78,7 @@ decoder_Clean
decoder_Destroy
decoder_AbortPictures
decoder_NewAudioBuffer
decoder_UpdateVideoFormat
demux_PacketizerDestroy
demux_PacketizerNew
demux_New

Loading…
Cancel
Save