mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-17 22:31:18 +08:00
avformat: Avoid allocation for AVStreamInternal
Do this by allocating AVStream together with the data that is currently in AVStreamInternal; or rather: Put AVStream at the beginning of a new structure called FFStream (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVStreamInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -991,10 +991,10 @@ static int seg_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
|
||||
if (oc->oformat->check_bitstream) {
|
||||
int ret = oc->oformat->check_bitstream(oc, pkt);
|
||||
if (ret == 1) {
|
||||
AVStream *st = s->streams[pkt->stream_index];
|
||||
AVStream *ost = oc->streams[pkt->stream_index];
|
||||
st->internal->bsfc = ost->internal->bsfc;
|
||||
ost->internal->bsfc = NULL;
|
||||
FFStream *const sti = ffstream( s->streams[pkt->stream_index]);
|
||||
FFStream *const osti = ffstream(oc->streams[pkt->stream_index]);
|
||||
sti->bsfc = osti->bsfc;
|
||||
osti->bsfc = NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user