]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg: avoid bogus error with "test.flac -c copy -f null -"
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 31 Jul 2012 23:47:51 +0000 (01:47 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 31 Jul 2012 23:47:51 +0000 (01:47 +0200)
Reported-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index c2ea5bd894db735c847dc44e535447cfe355d382..f85d8e01a81f519657fe74d9256b31711945598e 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2343,7 +2343,8 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
         opkt.data = pkt->data;
         opkt.size = pkt->size;
     }
-    if (of->ctx->oformat->flags & AVFMT_RAWPICTURE) {
+
+    if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (of->ctx->oformat->flags & AVFMT_RAWPICTURE)) {
         /* store AVPicture in AVPacket, as expected by the output format */
         avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height);
         opkt.data = (uint8_t *)&pict;