dashdemux: Handle bitrate > 2**31

On very-high connection, we could quite well exceed that. Instead use
gint64 for max-bitrate.
This commit is contained in:
Edward Hervey 2017-11-25 09:41:00 +01:00 committed by Edward Hervey
parent ee0212b83d
commit 2877aac9a5
2 changed files with 3 additions and 3 deletions

View file

@ -2504,14 +2504,14 @@ gst_mpdparser_get_rep_idx_with_min_bandwidth (GList * Representations)
gint gint
gst_mpdparser_get_rep_idx_with_max_bandwidth (GList * Representations, gst_mpdparser_get_rep_idx_with_max_bandwidth (GList * Representations,
gint max_bandwidth, gint max_video_width, gint max_video_height, gint gint64 max_bandwidth, gint max_video_width, gint max_video_height, gint
max_video_framerate_n, gint max_video_framerate_d) max_video_framerate_n, gint max_video_framerate_d)
{ {
GList *list = NULL, *best = NULL; GList *list = NULL, *best = NULL;
GstRepresentationNode *representation; GstRepresentationNode *representation;
gint best_bandwidth = 0; gint best_bandwidth = 0;
GST_DEBUG ("max_bandwidth = %i", max_bandwidth); GST_DEBUG ("max_bandwidth = %" G_GINT64_FORMAT, max_bandwidth);
if (Representations == NULL) if (Representations == NULL)
return -1; return -1;

View file

@ -562,7 +562,7 @@ gboolean gst_mpd_client_has_next_period (GstMpdClient *client);
gboolean gst_mpd_client_has_previous_period (GstMpdClient * client); gboolean gst_mpd_client_has_previous_period (GstMpdClient * client);
/* Representation selection */ /* Representation selection */
gint gst_mpdparser_get_rep_idx_with_max_bandwidth (GList *Representations, gint max_bandwidth, gint max_video_width, gint max_video_height, gint max_video_framerate_n, gint max_video_framerate_d); gint gst_mpdparser_get_rep_idx_with_max_bandwidth (GList *Representations, gint64 max_bandwidth, gint max_video_width, gint max_video_height, gint max_video_framerate_n, gint max_video_framerate_d);
gint gst_mpdparser_get_rep_idx_with_min_bandwidth (GList * Representations); gint gst_mpdparser_get_rep_idx_with_min_bandwidth (GList * Representations);
/* URL management */ /* URL management */