diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-20 19:40:17 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-20 19:40:17 +0100 |
| commit | ef34d24ba785db44c6f12df5a0f22782576644d8 (patch) | |
| tree | 86580a4570af2c6c21b937d0515286eecac5dc5e /src/lib | |
| parent | 58f53485bb112896a9446771acfa2abe0a528cec (diff) | |
A bit of tidying up.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 6 | ||||
| -rw-r--r-- | src/lib/film_state.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index d93b023c3..e52ea735f 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -128,11 +128,11 @@ FFmpegDecoder::setup_general () /* Now override audio and subtitle streams with those from the Film, if it has any */ if (_fs->audio_stream_index() != -1) { - _audio_stream = _fs->audio_stream_decoder_id (); + _audio_stream = _fs->audio_stream().id(); } if (_fs->subtitle_stream_index() != -1) { - _subtitle_stream = _fs->subtitle_stream_decoder_id (); + _subtitle_stream = _fs->subtitle_stream().id (); } if (_video_stream < 0) { @@ -232,7 +232,7 @@ FFmpegDecoder::do_pass () int const data_size = av_samples_get_buffer_size ( 0, _audio_codec_context->channels, _frame->nb_samples, audio_sample_format (), 1 ); - + assert (_audio_codec_context->channels == _fs->audio_channels()); process_audio (_frame->data[0], data_size); } diff --git a/src/lib/film_state.h b/src/lib/film_state.h index 46374a17d..c76e845f3 100644 --- a/src/lib/film_state.h +++ b/src/lib/film_state.h @@ -194,9 +194,9 @@ public: return _audio_stream; } - int audio_stream_decoder_id () const { + AudioStream audio_stream () const { assert (_audio_stream < int (_audio_streams.size())); - return _audio_streams[_audio_stream].id (); + return _audio_streams[_audio_stream]; } float audio_gain () const { @@ -215,9 +215,9 @@ public: return _subtitle_stream; } - int subtitle_stream_decoder_id () const { + SubtitleStream subtitle_stream () const { assert (_subtitle_stream < int (_subtitle_streams.size())); - return _subtitle_streams[_subtitle_stream].id (); + return _subtitle_streams[_subtitle_stream]; } bool with_subtitles () const { |
