The recent changes in 88ae9af causes av_read_frame to check for m->stopping, and fail with AVERROR_EXIT if true, which would happen after each reset. Moving mp_media_prepare_frames to a line after m->stopping is reset to false fixes the issue.
88ae9af