Video player error com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException in Flutter

I try to use video_player and chewie to display the video but when user already watch the video, then user has to sent a feadback of that video. The problem is when users sent their feedback and they want to watch other video, the videos are not display and i got the error like this:

Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.MTK.VIDEO.DECODER.AVC, Format(1, null, null, video/avc, null, -1, null, [1920, 976, -1.0], [-1, -1]), null)

But when i close the app and open it again, the problem was gone but if user sent the feedback again the problem will be occurred.

this is the picture of the problem in the app. [the problem]

and this picture is How the video display when user is not sent the feedback yet. [the video]

and this is my code for showing the video

class ChewieListItem extends StatefulWidget{
  final VideoPlayerController videoPlayerController;
  final bool looping;

  ChewieListItem({
    @required this.videoPlayerController,
    this.looping,
    Key key,
  }) : super(key: key);

  @override
  _ChewieListItemState createState() => _ChewieListItemState();
}

class _ChewieListItemState extends State<ChewieListItem>{
  ChewieController _chewieController;

  @override
  void initState(){
    super.initState();
    
    _chewieController = ChewieController(
      videoPlayerController: widget.videoPlayerController,
      aspectRatio: 3/1.5 ,
      autoInitialize: true,
      looping: widget.looping,
      autoPlay: false,
      errorBuilder: (context, errorMessage){
        return Center(
          child: Text(errorMessage,
          style: TextStyle(color: Colors.white),
          ),
        );
      }
    );
  }

  @override
  Widget build(BuildContext context){
    return Padding(
      padding: const EdgeInsets.all(2.0),
      child: Chewie(
        controller: _chewieController,
      ),
    );
  }
  @override
  void dispose(){
    super.dispose();
    widget.videoPlayerController.dispose();
    _chewieController.dispose();
  }
}

Thank you for your answer and suggestion.


this error maybe occurs when phone device is using many video decoder instance. for RAM limitation almost every device share this limitation of the decoder instance between apps.
better using one instance of player and dispose it after. for more information and details see this issues https://github.com/google/ExoPlayer/issues/5799