From 7002684e69145236e2ee4e4156312430ae70eeb8 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 14 Oct 2002 17:53:02 +0000 Subject: [PATCH] raw picture support in mux Originally committed as revision 1035 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ffmpeg.c b/ffmpeg.c index 260857659e..eaa95b5dd9 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -559,7 +559,15 @@ static void do_video_out(AVFormatContext *s, fprintf(ost->logfile, "%s", enc->stats_out); } } else { - write_picture(s, ost->index, picture, enc->pix_fmt, enc->width, enc->height); + if (s->oformat->flags & AVFMT_RAWPICTURE) { + /* raw pictures are written as AVPicture structure to + avoid any copies. We support temorarily the older + method. */ + s->oformat->write_packet(s, ost->index, + (UINT8 *)picture, sizeof(AVPicture), 0); + } else { + write_picture(s, ost->index, picture, enc->pix_fmt, enc->width, enc->height); + } } } the_end: