summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-06 14:53:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-06 14:53:49 +0100
commit6e9f3f3b6522a8c1440bab66c8a2d85791fd12f7 (patch)
tree502e9b517e24b857069884bda22575eaf9c2779c /libavcodec
parentfadf845973aeb47d1b0bf3eac552394fd8a71437 (diff)
parent238614de679a71970c20d7c3fee08a322967ec40 (diff)
downloadffmpeg-streaming-6e9f3f3b6522a8c1440bab66c8a2d85791fd12f7.zip
ffmpeg-streaming-6e9f3f3b6522a8c1440bab66c8a2d85791fd12f7.tar.gz
Merge commit '238614de679a71970c20d7c3fee08a322967ec40'
* commit '238614de679a71970c20d7c3fee08a322967ec40': cdgraphics: do not rely on get_buffer() initializing the frame. svq1: replace struct svq1_frame_size with an array. vf_yadif: silence a warning. Conflicts: libavcodec/svq1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cdgraphics.c2
-rw-r--r--libavcodec/svq1.c2
-rw-r--r--libavcodec/svq1.h7
-rw-r--r--libavcodec/svq1dec.c4
4 files changed, 6 insertions, 9 deletions
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index 71d9da7..6d957f3 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -291,6 +291,8 @@ static int cdg_decode_frame(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
return ret;
}
+ if (!avctx->frame_number)
+ memset(cc->frame.data[0], 0, cc->frame.linesize[0] * avctx->height);
command = bytestream_get_byte(&buf);
inst = bytestream_get_byte(&buf);
diff --git a/libavcodec/svq1.c b/libavcodec/svq1.c
index 0c19a6d..c219f22 100644
--- a/libavcodec/svq1.c
+++ b/libavcodec/svq1.c
@@ -37,7 +37,7 @@
#include "svq1_vlc.h"
/* standard video sizes */
-const struct svq1_frame_size ff_svq1_frame_size_table[7] = {
+const uint16_t ff_svq1_frame_size_table[7][2] = {
{ 160, 120 }, { 128, 96 }, { 176, 144 }, { 352, 288 },
{ 704, 576 }, { 240, 180 }, { 320, 240 }
};
diff --git a/libavcodec/svq1.h b/libavcodec/svq1.h
index 9b132e2..8380f22 100644
--- a/libavcodec/svq1.h
+++ b/libavcodec/svq1.h
@@ -42,11 +42,6 @@
#define SVQ1_BLOCK_INTER_4V 2
#define SVQ1_BLOCK_INTRA 3
-struct svq1_frame_size {
- uint16_t width;
- uint16_t height;
-};
-
uint16_t ff_svq1_packet_checksum(const uint8_t *data,
const int length, int value);
@@ -59,6 +54,6 @@ extern const uint8_t ff_svq1_inter_multistage_vlc[6][8][2];
extern const uint16_t ff_svq1_intra_mean_vlc[256][2];
extern const uint16_t ff_svq1_inter_mean_vlc[512][2];
-extern const struct svq1_frame_size ff_svq1_frame_size_table[7];
+extern const uint16_t ff_svq1_frame_size_table[7][2];
#endif /* AVCODEC_SVQ1_H */
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 5735683..5b9a620 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -575,8 +575,8 @@ static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame)
return AVERROR_INVALIDDATA;
} else {
/* get width, height from table */
- width = ff_svq1_frame_size_table[frame_size_code].width;
- height = ff_svq1_frame_size_table[frame_size_code].height;
+ width = ff_svq1_frame_size_table[frame_size_code][0];
+ height = ff_svq1_frame_size_table[frame_size_code][1];
}
}
OpenPOWER on IntegriCloud