Commit d57a9928 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: avoid bogus error with "test.flac -c copy -f null -"

Reported-by: durandal_1707
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d1dad7c8
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment