diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-08-21 02:16:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-08-21 03:39:22 +0200 |
commit | 1c058d94b9ea7f9cfe418495c74204c6962a6d65 (patch) | |
tree | e4ff4f7443842eef0b1fb4907b6a098bed634a66 | |
parent | b15311eb6f979fa2c14b72db9a05710503e4e6f6 (diff) | |
download | ffmpeg-1c058d94b9ea7f9cfe418495c74204c6962a6d65.tar.gz |
ffmpeg: Check for RAWVIDEO and do not relay only on AVFMT_RAWPICTURE
The null muxer has AVFMT_RAWPICTURE set but can be fed with non-raw material
related to Ticket4778
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8890941d63df786bb7a8cab92677416499bb7c3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1708,7 +1708,9 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p } av_copy_packet_side_data(&opkt, pkt); - if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (of->ctx->oformat->flags & AVFMT_RAWPICTURE)) { + if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && + ost->st->codec->codec_id == AV_CODEC_ID_RAWVIDEO && + (of->ctx->oformat->flags & AVFMT_RAWPICTURE)) { /* store AVPicture in AVPacket, as expected by the output format */ int ret = avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height); if (ret < 0) { |