Johannes Weißl
2011-01-20 09:49:22 UTC
ffmpeg.c:275: warning: ISO C90 forbids mixed declarations and code
---
ffmpeg.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 3f2077d..69e3e0f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -272,12 +272,14 @@ static int ffmpeg_fill_buffer(AVFormatContext *ic, AVCodecContext *cc, struct ff
len = avcodec_decode_audio2(cc, (int16_t *) output->buffer, &frame_size,
input->curr_pkt_buf, input->curr_pkt_size);
#else
- AVPacket avpkt;
- av_init_packet(&avpkt);
- avpkt.data = input->curr_pkt_buf;
- avpkt.size = input->curr_pkt_size;
- len = avcodec_decode_audio3(cc, (int16_t *) output->buffer, &frame_size, &avpkt);
- av_free_packet(&avpkt);
+ {
+ AVPacket avpkt;
+ av_init_packet(&avpkt);
+ avpkt.data = input->curr_pkt_buf;
+ avpkt.size = input->curr_pkt_size;
+ len = avcodec_decode_audio3(cc, (int16_t *) output->buffer, &frame_size, &avpkt);
+ av_free_packet(&avpkt);
+ }
#endif
if (len < 0) {
/* this is often reached when seeking, not sure why */
---
ffmpeg.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 3f2077d..69e3e0f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -272,12 +272,14 @@ static int ffmpeg_fill_buffer(AVFormatContext *ic, AVCodecContext *cc, struct ff
len = avcodec_decode_audio2(cc, (int16_t *) output->buffer, &frame_size,
input->curr_pkt_buf, input->curr_pkt_size);
#else
- AVPacket avpkt;
- av_init_packet(&avpkt);
- avpkt.data = input->curr_pkt_buf;
- avpkt.size = input->curr_pkt_size;
- len = avcodec_decode_audio3(cc, (int16_t *) output->buffer, &frame_size, &avpkt);
- av_free_packet(&avpkt);
+ {
+ AVPacket avpkt;
+ av_init_packet(&avpkt);
+ avpkt.data = input->curr_pkt_buf;
+ avpkt.size = input->curr_pkt_size;
+ len = avcodec_decode_audio3(cc, (int16_t *) output->buffer, &frame_size, &avpkt);
+ av_free_packet(&avpkt);
+ }
#endif
if (len < 0) {
/* this is often reached when seeking, not sure why */
--
1.7.2.3
1.7.2.3