Avoiding segmentation fault on streams without samples
An informational message is logged instead. Fixes #446. Change-Id: Ia3a79a16b3bdbabd5d56facf9bf011f29c9b1533
This commit is contained in:
parent
64c3b4c558
commit
416051ae65
|
@ -147,7 +147,16 @@ Status MP4Muxer::InitializeMuxer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Status MP4Muxer::Finalize() {
|
Status MP4Muxer::Finalize() {
|
||||||
DCHECK(segmenter_);
|
// This happens on streams that are not initialized, i.e. not going through
|
||||||
|
// DelayInitializeMuxer, which can only happen if there are no samples from
|
||||||
|
// the stream.
|
||||||
|
if (!segmenter_) {
|
||||||
|
DCHECK(to_be_initialized_);
|
||||||
|
LOG(INFO) << "Skip stream '" << options().output_file_name
|
||||||
|
<< "' which does not contain any sample.";
|
||||||
|
return Status::OK;
|
||||||
|
}
|
||||||
|
|
||||||
Status segmenter_finalized = segmenter_->Finalize();
|
Status segmenter_finalized = segmenter_->Finalize();
|
||||||
|
|
||||||
if (!segmenter_finalized.ok())
|
if (!segmenter_finalized.ok())
|
||||||
|
|
Loading…
Reference in New Issue