libx264: zero x264_picture before use.

This prevents use of uninitialized memory by ffmpeg later
(i_qpplus1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/avpacket: Refactoring copy_side_data into a separate function

Refactoring copy_side_data into a separate function so that it can be called
in cases where side data needs to be duplicated.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>