media_module: fixed h264 mosaic/freeze about 1mins issue [1/1]
PD#SWPL-26106
Problem:
1. Due to the particularity of the video file,
it will lead to the diffusion of the error,
resulting playback stuck.
2. Due to the video file error, a reference
frame is not out of the dpb queue, and the
subsequent frames are always referring to this
frame, resulting show mosaic.
3. One frame is decoded into multiple frames
4. Two frames of data are decoded into one frame
Solution:
1.the number of continuous errors reaches
a certain number, this frame is considered to
be correct, so that the error will not continue
to spread.
2.a reference frame exceeds 50 frames and is
not remove dpb queue, the frame is considered
to be problematic and removed from dpb queue
3.two consecutive frames are ref frames and
the frame number is the same, the second one
will not enter the DPB queue.
4.Depending on the information when parsing
slice head, If find two frames decoded into
one frame, saving the previous frame into DPB
before continuing to unwrap the second frame.
Verify:
U215
Change-Id: I64ff9f66cd955689161d45d70867cba7e166937d
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
(cherry picked from commit
4a2a8fc447c4a6307233628e1f2fff14c217f609)