]> git.sesse.net Git - ffmpeg/commit
avcodec/rv10: Don't presume context to be initialized
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sun, 4 Apr 2021 19:30:33 +0000 (21:30 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Wed, 7 Apr 2021 23:16:25 +0000 (01:16 +0200)
commit8ffd3ef9d94f33b411348c594a49d994b55c9550
treec220779732dfadcfed6e2983d8b8b7212a11b894
parent9bab7de175d7c942a6ebddae6ba0cacdf360827e
avcodec/rv10: Don't presume context to be initialized

In case of resolution changes rv20_decode_picture_header() closes and
reopens its MpegEncContext; it checks the latter for errors, yet when
an error happens, it might happen that no new attempt at
reinitialization is performed when decoding the next frame; this leads
to crashes lateron.

This commit fixes this by making sure that initialization will always
be attempted if the context is currently not initialized.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
libavcodec/rv10.c