Skip to content

Commit 2d46371

Browse files
committed
api2-remux: replace CodecParameters access with Getters&Setters
1 parent f5b9ac9 commit 2d46371

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/api2-samples/api2-remux.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ int main(int argc, char **argv)
114114
for (size_t i = 0, ostIdx = 0; i < ictx.streamsCount(); ++i) {
115115
auto ist = ictx.stream(i);
116116
auto icodecpar = ist.codecParameters();
117-
auto ocodec = av::findEncodingCodec(icodecpar.raw()->codec_id);
117+
auto ocodec = icodecpar.decodingCodec();
118118

119119
// Source codec can be unsupprted by the target format. Transcoding required or simple skip.
120120
if (!octx.outputFormat().codecSupported(ocodec)) {
@@ -125,7 +125,7 @@ int main(int argc, char **argv)
125125

126126
auto ost = octx.addStream(ec);
127127
ost.setCodecParameters(icodecpar);
128-
ost.codecParameters().raw()->codec_tag = 0;
128+
ost.codecParameters().codecTag(0);
129129

130130
// We can omit codec checking above and got error FormatCodecUnsupported (error code or exception)
131131
if (ec) {

0 commit comments

Comments
 (0)