aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-08-21 02:16:31 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-26 16:58:31 +0100
commit5ab1f188534aaf44a43ccebccf0ffacd914beef5 (patch)
tree6337b344ea312c7dda98ea6e38130fcfc4f0d212
parent60e398f280d257ac56b1a90e5bffae8cd7dad364 (diff)
downloadffmpeg-5ab1f188534aaf44a43ccebccf0ffacd914beef5.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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 343728bd7d..751483fe0f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1757,7 +1757,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) {