Skip to content

Commit 99ad5fe

Browse files
committed
InputStream: create and fill CodedData before adding it to cache
1 parent 99dba44 commit 99ad5fe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/AvTranscoder/stream/InputStream.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ void InputStream::addPacket(const AVPacket& packet)
122122
return;
123123
}
124124

125-
LOG_DEBUG("Add a packet data for the stream " << _streamIndex << " to the cache")
126-
_streamCache.push(CodedData());
127-
_streamCache.back().copyData(packet.data, packet.size);
125+
LOG_DEBUG("Add a packet data for the stream " << _streamIndex << " to the cache");
126+
CodedData codedData;
127+
codedData.copyData(packet.data, packet.size);
128+
_streamCache.push(codedData);
128129
}
129130

130131
void InputStream::clearBuffering()

0 commit comments

Comments
 (0)