mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
mpg123audiodec: Fix dependence on off_t breaking Meson wrap-based builds
Using the mpg123_*_64 functions requires API level 48 i.e. mpg123 >= 1.32. The mpg123_*64 functions are available before then, but still depend on off_t (and as such introduce the bug in builds against distro provided mpg123). See https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1568#note_2624024 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7732>
This commit is contained in:
parent
95eca6d919
commit
ce35c07639
2 changed files with 9 additions and 0 deletions
|
@ -448,8 +448,13 @@ gst_mpg123_audio_dec_handle_frame (GstAudioDecoder * dec,
|
|||
/* Try to decode a frame */
|
||||
decoded_bytes = NULL;
|
||||
num_decoded_bytes = 0;
|
||||
#if MPG123_API_VERSION >= 48
|
||||
decode_error = mpg123_decode_frame64 (mpg123_decoder->handle,
|
||||
&mpg123_decoder->frame_offset, &decoded_bytes, &num_decoded_bytes);
|
||||
#else
|
||||
decode_error = mpg123_decode_frame (mpg123_decoder->handle,
|
||||
&mpg123_decoder->frame_offset, &decoded_bytes, &num_decoded_bytes);
|
||||
#endif
|
||||
|
||||
if (G_LIKELY (decoded_bytes != NULL)) {
|
||||
gst_mpg123_audio_dec_pop_oldest_clip_info (mpg123_decoder, &clip_start,
|
||||
|
|
|
@ -40,7 +40,11 @@ struct _GstMpg123AudioDec
|
|||
GstAudioInfo next_audioinfo;
|
||||
gboolean has_next_audioinfo;
|
||||
|
||||
#if MPG123_API_VERSION >= 48
|
||||
gint64 frame_offset;
|
||||
#else
|
||||
off_t frame_offset;
|
||||
#endif
|
||||
|
||||
GstVecDeque *audio_clip_info_queue;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue