Add the logging for 'Container not supported' error
Dump the first 512 bytes of the buffer if container is unknown. This can help us find out what the actual container is; and fix the container detection bug if there is. Closes #505. Change-Id: I4a8fe5954d0419ef2ccbb9067ec2e9ffe1da417e
This commit is contained in:
parent
70dfced819
commit
db3ed544f8
|
@ -199,9 +199,17 @@ Status Demuxer::InitializeParser() {
|
|||
case CONTAINER_WEBM:
|
||||
parser_.reset(new WebMMediaParser());
|
||||
break;
|
||||
break;
|
||||
case CONTAINER_UNKNOWN: {
|
||||
const int64_t kDumpSizeLimit = 512;
|
||||
LOG(ERROR) << "Failed to detect the container type from the buffer: "
|
||||
<< base::HexEncode(buffer_.get(),
|
||||
std::min(bytes_read, kDumpSizeLimit));
|
||||
return Status(error::INVALID_ARGUMENT,
|
||||
"Failed to detect the container type.");
|
||||
}
|
||||
default:
|
||||
NOTIMPLEMENTED();
|
||||
NOTIMPLEMENTED() << "Container " << container_name_
|
||||
<< " is not supported.";
|
||||
return Status(error::UNIMPLEMENTED, "Container not supported.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue