summaryrefslogtreecommitdiffstats
path: root/recipes/ffmpeg/files/0001-Remove-pointless-function-frame_format.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/ffmpeg/files/0001-Remove-pointless-function-frame_format.patch')
-rw-r--r--recipes/ffmpeg/files/0001-Remove-pointless-function-frame_format.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes/ffmpeg/files/0001-Remove-pointless-function-frame_format.patch b/recipes/ffmpeg/files/0001-Remove-pointless-function-frame_format.patch
new file mode 100644
index 0000000000..07357c9907
--- /dev/null
+++ b/recipes/ffmpeg/files/0001-Remove-pointless-function-frame_format.patch
@@ -0,0 +1,60 @@
+From 27e9c12063427e6d1c245d9ce594916966764750 Mon Sep 17 00:00:00 2001
+From: Mans Rullgard <mans@mansr.com>
+Date: Wed, 26 Jan 2011 18:34:26 +0000
+Subject: [PATCH 1/3] Remove pointless function frame_format()
+
+Decoders are required to fill in the frame format.
+---
+ omapfbplay.c | 22 ++++++++--------------
+ 1 files changed, 8 insertions(+), 14 deletions(-)
+
+diff --git a/omapfbplay.c b/omapfbplay.c
+index 3409780..2daed18 100644
+--- a/omapfbplay.c
++++ b/omapfbplay.c
+@@ -300,17 +300,6 @@ void ofbp_post_frame(struct frame *f)
+ }
+
+ static void
+-frame_format(int width, int height, struct frame_format *ff)
+-{
+- ff->width = ALIGN(width, 32);
+- ff->height = ALIGN(height, 32);
+- ff->disp_x = 0;
+- ff->disp_y = 0;
+- ff->disp_w = width;
+- ff->disp_h = height;
+-}
+-
+-static void
+ init_frames(struct frame_format *ff)
+ {
+ const struct pixfmt *pf = ofbp_get_pixfmt(ff->pixfmt);
+@@ -445,7 +434,12 @@ speed_test(const char *drv, const char *mem, const char *conv,
+ return 1;
+ }
+
+- frame_format(w, h, &ff);
++ ff.width = ALIGN(w, 32);
++ ff.height = ALIGN(h, 32);
++ ff.disp_x = 0;
++ ff.disp_y = 0;
++ ff.disp_w = w;
++ ff.disp_h = h;
+
+ dp.pixfmt = ff.pixfmt = PIX_FMT_YUV420P;
+ display = display_open(drv, &dp, &ff);
+@@ -599,8 +593,8 @@ main(int argc, char **argv)
+ }
+
+ if (!frame_fmt.width) {
+- frame_fmt.pixfmt = st->codec->pix_fmt;
+- frame_format(st->codec->width, st->codec->height, &frame_fmt);
++ fprintf(stderr, "Decoder error: frame size not specified\n");
++ error(1);
+ }
+
+ dp.pixfmt = frame_fmt.pixfmt;
+--
+1.6.6.1
+