[FFmpeg-cvslog] ffmpeg: avoid bogus error with "test.flac -c copy -f null -"
Michael Niedermayer
git at videolan.org
Wed Aug 1 01:52:23 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 1 01:47:51 2012 +0200| [d57a9928eac1fdc908954eb89dc3d2783e4d1996] | committer: Michael Niedermayer
ffmpeg: avoid bogus error with "test.flac -c copy -f null -"
Reported-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d57a9928eac1fdc908954eb89dc3d2783e4d1996
---
ffmpeg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index c2ea5bd..f85d8e0 100644
--- 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;
More information about the ffmpeg-cvslog
mailing list