Commit c6a6d035 authored by andoma's avatar andoma

Fix a bug causing the generated stream to be corrupt if the buffer

contains NAL units previous to the IDR where the SPS/PPS was inserted.

Ok:ed by Benoit on irc.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11482 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4c785fc1
......@@ -41,8 +41,8 @@ static void alloc_and_copy(uint8_t **poutbuf, int *poutbuf_size,
if (!offset)
AV_WB32(*poutbuf+sps_pps_size, 1);
else {
(*poutbuf+offset)[0] = (*poutbuf+offset)[1] = 0;
(*poutbuf+offset)[2] = 1;
(*poutbuf+offset+sps_pps_size)[0] = (*poutbuf+offset+sps_pps_size)[1] = 0;
(*poutbuf+offset+sps_pps_size)[2] = 1;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment