comparison mtv.c @ 5976:e46f8cc350ef libavformat

Fix MTV decoding on big-endian systems
author vitor
date Wed, 21 Apr 2010 13:00:48 +0000
parents 178de7695c6c
children e630da0f5861
comparison
equal deleted inserted replaced
5975:028ad8c9a6f6 5976:e46f8cc350ef
123 return AVERROR(ENOMEM); 123 return AVERROR(ENOMEM);
124 124
125 av_set_pts_info(st, 64, 1, mtv->video_fps); 125 av_set_pts_info(st, 64, 1, mtv->video_fps);
126 st->codec->codec_type = AVMEDIA_TYPE_VIDEO; 126 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
127 st->codec->codec_id = CODEC_ID_RAWVIDEO; 127 st->codec->codec_id = CODEC_ID_RAWVIDEO;
128 st->codec->codec_tag = MKTAG('R', 'G', 'B', mtv->img_bpp); 128 st->codec->pix_fmt = PIX_FMT_RGB565;
129 st->codec->width = mtv->img_width; 129 st->codec->width = mtv->img_width;
130 st->codec->height = mtv->img_height; 130 st->codec->height = mtv->img_height;
131 st->codec->bits_per_coded_sample = mtv->img_bpp;
132 st->codec->sample_rate = mtv->video_fps; 131 st->codec->sample_rate = mtv->video_fps;
133 st->codec->extradata = av_strdup("BottomUp"); 132 st->codec->extradata = av_strdup("BottomUp");
134 st->codec->extradata_size = 9; 133 st->codec->extradata_size = 9;
135 134
136 // audio - mp3 135 // audio - mp3