Rework audio to deinterleave straight away and pass data
[dcpomatic.git] / src / lib / film_state.cc
index 82d492b9aec370bced5d63932b62e71650adad74..f2d83e4e27839a3d0ef824673b1d569950358afb 100644 (file)
@@ -358,14 +358,7 @@ FilmState::content_type () const
 int
 FilmState::bytes_per_sample () const
 {
-       switch (_audio_sample_format) {
-       case AV_SAMPLE_FMT_S16:
-               return 2;
-       default:
-               return 0;
-       }
-
-       return 0;
+       return av_get_bytes_per_sample (_audio_sample_format);
 }
 
 int