Browse Source

Update yuv4mpeg to use PIX_FMT_NONE patch by (Roine Gustafsson <roine users sourceforge net)

Originally committed as revision 4163 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Roine Gustafsson Michael Niedermayer 20 years ago
parent
commit
93b2b333b9
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      libavformat/yuv4mpeg.c

+ 3
- 3
libavformat/yuv4mpeg.c View File

@@ -192,7 +192,7 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap)
int i; int i;
ByteIOContext *pb = &s->pb; ByteIOContext *pb = &s->pb;
int width=-1, height=-1, raten=0, rated=0, aspectn=0, aspectd=0,interlaced_frame=0,top_field_first=0; int width=-1, height=-1, raten=0, rated=0, aspectn=0, aspectd=0,interlaced_frame=0,top_field_first=0;
enum PixelFormat pix_fmt=PIX_FMT_NB,alt_pix_fmt=PIX_FMT_NB;
enum PixelFormat pix_fmt=PIX_FMT_NONE,alt_pix_fmt=PIX_FMT_NONE;
AVStream *st; AVStream *st;
for (i=0; i<MAX_YUV4_HEADER; i++) { for (i=0; i<MAX_YUV4_HEADER; i++) {
@@ -300,8 +300,8 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1; return -1;
} }
if (pix_fmt == PIX_FMT_NB) {
if (alt_pix_fmt == PIX_FMT_NB)
if (pix_fmt == PIX_FMT_NONE) {
if (alt_pix_fmt == PIX_FMT_NONE)
pix_fmt = PIX_FMT_YUV420P; pix_fmt = PIX_FMT_YUV420P;
else else
pix_fmt = alt_pix_fmt; pix_fmt = alt_pix_fmt;


Loading…
Cancel
Save