[05/17] mpegvideo: Only build ff_mpeg_er_frame_start if error resilience is enabled

Message ID 1362578206-2806-5-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö March 6, 2013, 1:56 p.m.
This fixes build failures if mpegvideo is enabled but error
resilience is disabled, such as if building with --disable-everything
--enable-encoder=h261.
---
 libavcodec/mpegvideo.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Luca Barbato March 6, 2013, 2:38 p.m. | #1
On 06/03/13 14:56, Martin Storsjö wrote:
> This fixes build failures if mpegvideo is enabled but error
> resilience is disabled, such as if building with --disable-everything
> --enable-encoder=h261.
> ---
>  libavcodec/mpegvideo.c |    2 ++
>  1 file changed, 2 insertions(+)
> 

Ok.
Diego Biurrun March 6, 2013, 5:07 p.m. | #2
On Wed, Mar 06, 2013 at 03:38:35PM +0100, Luca Barbato wrote:
> On 06/03/13 14:56, Martin Storsjö wrote:
> > This fixes build failures if mpegvideo is enabled but error
> > resilience is disabled, such as if building with --disable-everything
> > --enable-encoder=h261.
> > ---
> >  libavcodec/mpegvideo.c |    2 ++
> >  1 file changed, 2 insertions(+)
> 
> Ok.

No, not OK.  h261 uses ER, so it needs to depend on ER instead.
Was this patch tested with a h261-only configuration?  It should
explode during the linking stage.

Diego
Hendrik Leppkes March 6, 2013, 5:20 p.m. | #3
On Wed, Mar 6, 2013 at 6:07 PM, Diego Biurrun <diego@biurrun.de> wrote:
> On Wed, Mar 06, 2013 at 03:38:35PM +0100, Luca Barbato wrote:
>> On 06/03/13 14:56, Martin Storsjö wrote:
>> > This fixes build failures if mpegvideo is enabled but error
>> > resilience is disabled, such as if building with --disable-everything
>> > --enable-encoder=h261.
>> > ---
>> >  libavcodec/mpegvideo.c |    2 ++
>> >  1 file changed, 2 insertions(+)
>>
>> Ok.
>
> No, not OK.  h261 uses ER, so it needs to depend on ER instead.
> Was this patch tested with a h261-only configuration?  It should
> explode during the linking stage.
>

Isn't that exactly what Martins comment says it fixes?
Martin Storsjö March 6, 2013, 5:21 p.m. | #4
On Wed, 6 Mar 2013, Diego Biurrun wrote:

> On Wed, Mar 06, 2013 at 03:38:35PM +0100, Luca Barbato wrote:
>> On 06/03/13 14:56, Martin Storsjö wrote:
>>> This fixes build failures if mpegvideo is enabled but error
>>> resilience is disabled, such as if building with --disable-everything
>>> --enable-encoder=h261.
>>> ---
>>>  libavcodec/mpegvideo.c |    2 ++
>>>  1 file changed, 2 insertions(+)
>>
>> Ok.
>
> No, not OK.  h261 uses ER, so it needs to depend on ER instead.
> Was this patch tested with a h261-only configuration?  It should
> explode during the linking stage.

The h261 decoder uses ER, and also declares the dependency correctly as 
far as I can see. The h261 ENcoder does not use it, and does not declare 
any such dependency.

// Martin

Patch

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index e319aa6..57c29df 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2833,6 +2833,7 @@  void ff_MPV_report_decode_progress(MpegEncContext *s)
         ff_thread_report_progress(&s->current_picture_ptr->f, s->mb_y, 0);
 }
 
+#if CONFIG_ERROR_RESILIENCE
 void ff_mpeg_er_frame_start(MpegEncContext *s)
 {
     ERContext *er = &s->er;
@@ -2848,3 +2849,4 @@  void ff_mpeg_er_frame_start(MpegEncContext *s)
 
     ff_er_frame_start(er);
 }
+#endif