aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarthik Ramanan2016-05-17 05:54:52 -0500
committerKarthik Ramanan2016-05-17 05:54:52 -0500
commit297d748d0a97999bc562d406609ab7e80fc28cb1 (patch)
tree3ca618ccbc6d59b1af3df911da665adfeffaa4fc
parent833f2ebb296d8555bd6d6c68290830435a3f8203 (diff)
downloadomapdrmtest-297d748d0a97999bc562d406609ab7e80fc28cb1.tar.gz
omapdrmtest-297d748d0a97999bc562d406609ab7e80fc28cb1.tar.xz
omapdrmtest-297d748d0a97999bc562d406609ab7e80fc28cb1.zip
util/viddec3test: Update use of deprecated APIs and enums
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
-rw-r--r--util/demux.c6
-rw-r--r--viddec3test.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/util/demux.c b/util/demux.c
index e932ac4..a77bbb8 100644
--- a/util/demux.c
+++ b/util/demux.c
@@ -84,7 +84,7 @@ static struct demux * open_stream(const char * filename, int *width, int *height
84 AVBitStreamFilterContext *bsf = NULL; 84 AVBitStreamFilterContext *bsf = NULL;
85 struct demux *demux; 85 struct demux *demux;
86 86
87 if ((cc->codec_id != CODEC_ID_H264) && (cc->codec_id != CODEC_ID_MPEG2VIDEO) && ( cc->codec_id != CODEC_ID_MPEG4)){ 87 if ((cc->codec_id != AV_CODEC_ID_H264) && (cc->codec_id != AV_CODEC_ID_MPEG2VIDEO) && ( cc->codec_id != AV_CODEC_ID_MPEG4)){
88 ERROR("could not open '%s': unsupported codec %d", filename, cc->codec_id); 88 ERROR("could not open '%s': unsupported codec %d", filename, cc->codec_id);
89 return NULL; 89 return NULL;
90 } 90 }
@@ -119,7 +119,7 @@ struct demux * demux_init(const char * filename, int *width, int *height)
119 av_register_all(); 119 av_register_all();
120 avcodec_register_all(); 120 avcodec_register_all();
121 demux = open_stream(filename, width, height); 121 demux = open_stream(filename, width, height);
122 if ((demux != NULL) && (demux->cc->codec_id == CODEC_ID_MPEG4)) { 122 if ((demux != NULL) && (demux->cc->codec_id == AV_CODEC_ID_MPEG4)) {
123 if(get_esds_offset(filename, demux)) 123 if(get_esds_offset(filename, demux))
124 return NULL; 124 return NULL;
125 } 125 }
@@ -230,7 +230,7 @@ int demux_rewind(struct demux *demux)
230 230
231void demux_deinit(struct demux *demux) 231void demux_deinit(struct demux *demux)
232{ 232{
233 av_close_input_file(demux->afc); 233 avformat_close_input(demux->afc);
234 if (demux->bsf) 234 if (demux->bsf)
235 av_bitstream_filter_close(demux->bsf); 235 av_bitstream_filter_close(demux->bsf);
236 free(demux->esds.data); 236 free(demux->esds.data);
diff --git a/viddec3test.c b/viddec3test.c
index 984334a..edaaf41 100644
--- a/viddec3test.c
+++ b/viddec3test.c
@@ -157,7 +157,7 @@ decoder_open(int argc, char **argv)
157 /* calculate output buffer parameters: */ 157 /* calculate output buffer parameters: */
158 width = ALIGN2 (width, 4); /* round up to macroblocks */ 158 width = ALIGN2 (width, 4); /* round up to macroblocks */
159 height = ALIGN2 (height, 4); /* round up to macroblocks */ 159 height = ALIGN2 (height, 4); /* round up to macroblocks */
160 if (decoder->demux->cc->codec_id == CODEC_ID_MPEG2VIDEO) { 160 if (decoder->demux->cc->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
161 padded_width = width; 161 padded_width = width;
162 padded_height= height; 162 padded_height= height;
163 } 163 }
@@ -230,15 +230,15 @@ decoder_open(int argc, char **argv)
230 decoder->params->numOutputDataUnits = 0; 230 decoder->params->numOutputDataUnits = 0;
231 decoder->params->errorInfoMode = IVIDEO_ERRORINFO_OFF; 231 decoder->params->errorInfoMode = IVIDEO_ERRORINFO_OFF;
232 232
233 if (decoder->demux->cc->codec_id == CODEC_ID_MPEG2VIDEO) { 233 if (decoder->demux->cc->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
234 decoder->codec = VIDDEC3_create(decoder->engine, 234 decoder->codec = VIDDEC3_create(decoder->engine,
235 "ivahd_mpeg2vdec", decoder->params); 235 "ivahd_mpeg2vdec", decoder->params);
236 } 236 }
237 else if (decoder->demux->cc->codec_id == CODEC_ID_H264) { 237 else if (decoder->demux->cc->codec_id == AV_CODEC_ID_H264) {
238 decoder->codec = VIDDEC3_create(decoder->engine, 238 decoder->codec = VIDDEC3_create(decoder->engine,
239 "ivahd_h264dec", decoder->params); 239 "ivahd_h264dec", decoder->params);
240 } 240 }
241 else if (decoder->demux->cc->codec_id == CODEC_ID_MPEG4) { 241 else if (decoder->demux->cc->codec_id == AV_CODEC_ID_MPEG4) {
242 decoder->demux->first_in_buff = 1; 242 decoder->demux->first_in_buff = 1;
243 decoder->codec = VIDDEC3_create(decoder->engine, 243 decoder->codec = VIDDEC3_create(decoder->engine,
244 "ivahd_mpeg4dec", decoder->params); 244 "ivahd_mpeg4dec", decoder->params);