Skip to content

Commit

Permalink
Merge pull request wang-bin#973 from 0xFelix/mediaIOWritable
Browse files Browse the repository at this point in the history
Set AccessMode of MediaIO according to QIODevice it is created from
  • Loading branch information
wang-bin authored Oct 16, 2017
2 parents f8d9982 + 16da473 commit 35b466b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/AVMuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ bool AVMuxer::setMedia(QIODevice* device)
d->format_forced.clear();
}
d->io->setProperty("device", QVariant::fromValue(device)); //open outside?

if (device->isWritable()) {
d->io->setAccessMode(MediaIO::Write);
}

return d->media_changed;
}

Expand Down

0 comments on commit 35b466b

Please sign in to comment.