mjpegenc_common: check for codec ID before using avctx->priv_data
authorRostislav Pehlivanov <atomnuker@gmail.com>
Mon, 3 Apr 2017 20:13:28 +0000 (21:13 +0100)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Sat, 8 Apr 2017 22:57:39 +0000 (23:57 +0100)
commit2c9be3882a03823413945bd9e2d9af33e6e322d5
tree7545e7c40ca7699d66d4afc301735b7caef2ce79
parenta8b5f375010912abd9d41bde0992c63a548d56a6
mjpegenc_common: check for codec ID before using avctx->priv_data

When coding lossless jpeg the priv context will be pointing to LJpegEncContext
rather than MpegEncContext, which the function expects.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
libavcodec/mjpegenc_common.c