[vlc-commits] aout: move some code

Rémi Denis-Courmont git at videolan.org
Fri Jan 18 22:12:47 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jan 18 21:03:58 2019 +0200| [a9d58132ad453b1f0f9a4a2b9a44d57f7f217c34] | committer: Rémi Denis-Courmont

aout: move some code

No functional changes.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a9d58132ad453b1f0f9a4a2b9a44d57f7f217c34
---

 src/audio_output/filters.c | 4 +++-
 src/input/decoder.c        | 8 --------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index 1b8f82bc72..d1b9dbecf7 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -389,8 +389,10 @@ vout_thread_t *aout_filter_GetVout(filter_t *filter, const video_format_t *fmt)
      * need to add a new pf_aout_request_vout callback or store a pointer
      * to aout_request_vout_t inside filter_t (i.e. a level of indirection). */
     const aout_request_vout_t *req = filter->owner.sys;
+    video_format_t adj_fmt = *fmt;
 
-    return req->pf_request_vout(req->p_private, NULL, fmt);
+    video_format_AdjustColorSpace(&adj_fmt);
+    return req->pf_request_vout(req->p_private, NULL, &adj_fmt);
 }
 
 void aout_filter_PutVout(filter_t *filter, vout_thread_t *vout)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 5923c42421..1a7a6652a1 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -307,17 +307,9 @@ static vout_thread_t *aout_request_vout( void *p_private,
 {
     decoder_t *p_dec = p_private;
     struct decoder_owner *p_owner = dec_get_owner( p_dec );
-    video_format_t fmt;
 
     assert((p_fmt == NULL) != (p_vout == NULL));
 
-    if (p_fmt != NULL)
-    {
-        fmt = *p_fmt;
-        p_fmt = &fmt;
-        video_format_AdjustColorSpace( &fmt );
-    }
-
     p_vout = input_resource_RequestVout( p_owner->p_resource,
         &(vout_configuration_t){ .vout = p_vout, .fmt = p_fmt, .dpb_size = 1 },
         false );



More information about the vlc-commits mailing list