[FFmpeg-cvslog] movenc: fix remuxing of yuv2
Piotr Bandurski
git at videolan.org
Thu Jul 26 03:10:00 CEST 2012
ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Wed Jul 25 11:59:05 2012 +0200| [c5f23df2ddbf5239155ef6de127585788b2497ea] | committer: Michael Niedermayer
movenc: fix remuxing of yuv2
Attached patch fixes remuxing of yuv2 in mov (and does not break remuxing of yuvs)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5f23df2ddbf5239155ef6de127585788b2497ea
---
libavformat/movenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d2347e7..b50218c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -859,6 +859,7 @@ static const struct {
uint32_t tag;
unsigned bps;
} mov_pix_fmt_tags[] = {
+ { PIX_FMT_YUYV422, MKTAG('y','u','v','2'), 0 },
{ PIX_FMT_YUYV422, MKTAG('y','u','v','s'), 0 },
{ PIX_FMT_UYVY422, MKTAG('2','v','u','y'), 0 },
{ PIX_FMT_RGB555BE,MKTAG('r','a','w',' '), 16 },
@@ -881,7 +882,7 @@ static int mov_get_rawvideo_codec_tag(AVFormatContext *s, MOVTrack *track)
int i;
for (i = 0; i < FF_ARRAY_ELEMS(mov_pix_fmt_tags); i++) {
- if (track->enc->pix_fmt == mov_pix_fmt_tags[i].pix_fmt) {
+ if (track->enc->codec_tag == mov_pix_fmt_tags[i].tag && track->enc->pix_fmt == mov_pix_fmt_tags[i].pix_fmt) {
tag = mov_pix_fmt_tags[i].tag;
track->enc->bits_per_coded_sample = mov_pix_fmt_tags[i].bps;
break;
More information about the ffmpeg-cvslog
mailing list