Skip to content
Snippets Groups Projects
Commit c3e462a8 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

set supported pixel formats for a few encoders (fixes crashes with grayscale)

Originally committed as revision 6303 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 56f68a41
No related branches found
No related tags found
No related merge requests found
...@@ -632,6 +632,7 @@ AVCodec asv1_encoder = { ...@@ -632,6 +632,7 @@ AVCodec asv1_encoder = {
encode_init, encode_init,
encode_frame, encode_frame,
//encode_end, //encode_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
}; };
AVCodec asv2_encoder = { AVCodec asv2_encoder = {
...@@ -642,6 +643,7 @@ AVCodec asv2_encoder = { ...@@ -642,6 +643,7 @@ AVCodec asv2_encoder = {
encode_init, encode_init,
encode_frame, encode_frame,
//encode_end, //encode_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
}; };
#endif //CONFIG_ENCODERS #endif //CONFIG_ENCODERS
...@@ -1027,5 +1027,6 @@ AVCodec ffv1_encoder = { ...@@ -1027,5 +1027,6 @@ AVCodec ffv1_encoder = {
encode_init, encode_init,
encode_frame, encode_frame,
common_end, common_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGBA32, -1},
}; };
#endif #endif
...@@ -1026,6 +1026,7 @@ AVCodec h261_encoder = { ...@@ -1026,6 +1026,7 @@ AVCodec h261_encoder = {
MPV_encode_init, MPV_encode_init,
MPV_encode_picture, MPV_encode_picture,
MPV_encode_end, MPV_encode_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
}; };
#endif #endif
......
...@@ -848,5 +848,6 @@ AVCodec wmv2_encoder = { ...@@ -848,5 +848,6 @@ AVCodec wmv2_encoder = {
wmv2_encode_init, wmv2_encode_init,
MPV_encode_picture, MPV_encode_picture,
MPV_encode_end, MPV_encode_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUVJ420P, -1},
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment