[Merge] lp:~lorn-potter/media-hub/1420728 into lp:media-hub
Jim Hodapp
jim.hodapp at canonical.com
Fri Jun 17 01:52:37 UTC 2016
Review: Needs Fixing
One simple change.
Diff comments:
> === modified file 'src/core/media/gstreamer/playbin.cpp'
> --- src/core/media/gstreamer/playbin.cpp 2016-06-16 20:19:35 +0000
> +++ src/core/media/gstreamer/playbin.cpp 2016-06-16 22:43:50 +0000
> @@ -639,8 +639,27 @@
> if (!info)
> return std::string();
>
> - return std::string(g_file_info_get_attribute_string(
> - info.get(), G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE));
> + std::string content_type = g_file_info_get_attribute_string(
const std::string
> + info.get(), G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE);
> + if (content_type.empty())
> + return std::string();
> +
> + if (content_type == "application/octet-stream")
> + {
> + std::unique_ptr<GFileInfo, void(*)(void *)> full_info(
> + g_file_query_info(file.get(), G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
> + G_FILE_QUERY_INFO_NONE,
> + /* cancellable */ NULL, &error),g_object_unref);
> +
> + if (!full_info)
> + return std::string();
> +
> + content_type = g_file_info_get_attribute_string(
> + full_info.get(), G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
> + if (content_type.empty())
> + return std::string();
> + }
> + return content_type;
> }
>
> std::string gstreamer::Playbin::encode_uri(const std::string& uri) const
--
https://code.launchpad.net/~lorn-potter/media-hub/1420728/+merge/297707
Your team Ubuntu Phablet Team is subscribed to branch lp:media-hub.
More information about the Ubuntu-reviews
mailing list