A few tiny bug fixes.

This commit is contained in:
Oliver Woodman 2014-09-11 18:03:11 +01:00
parent ec90eac301
commit c19faa63cd
2 changed files with 2 additions and 4 deletions

View File

@ -329,7 +329,8 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
super.onInputFormatChanged(holder); super.onInputFormatChanged(holder);
// TODO: Ideally this would be read in onOutputFormatChanged, but there doesn't seem // TODO: Ideally this would be read in onOutputFormatChanged, but there doesn't seem
// to be a way to pass a custom key/value pair value through to the output format. // to be a way to pass a custom key/value pair value through to the output format.
currentPixelWidthHeightRatio = holder.format.pixelWidthHeightRatio; currentPixelWidthHeightRatio = holder.format.pixelWidthHeightRatio == MediaFormat.NO_VALUE ? 1
: holder.format.pixelWidthHeightRatio;
} }
@Override @Override

View File

@ -97,9 +97,6 @@ public class ManifestFetcher<T> extends AsyncTask<String, Void, T> {
HttpURLConnection connection = configureHttpConnection(new URL(urlString)); HttpURLConnection connection = configureHttpConnection(new URL(urlString));
inputStream = connection.getInputStream(); inputStream = connection.getInputStream();
inputEncoding = connection.getContentEncoding(); inputEncoding = connection.getContentEncoding();
if (inputEncoding == null) {
inputEncoding = C.UTF8_NAME;
}
return parser.parse(inputStream, inputEncoding, contentId, baseUri); return parser.parse(inputStream, inputEncoding, contentId, baseUri);
} finally { } finally {
if (inputStream != null) { if (inputStream != null) {