@@ -335,24 +335,23 @@ int open_input(input_params *params, struct input_ctx *ctx)
335
335
char * inp = params -> fname ;
336
336
int ret = 0 ;
337
337
338
- ctx -> transmuxing = params -> transmuxe ;
338
+ ctx -> transmuxing = params -> transmuxing ;
339
339
340
340
// open demuxer
341
341
ret = avformat_open_input (& ic , inp , NULL , NULL );
342
342
if (ret < 0 ) LPMS_ERR (open_input_err , "demuxer: Unable to open input" );
343
343
ctx -> ic = ic ;
344
344
ret = avformat_find_stream_info (ic , NULL );
345
345
if (ret < 0 ) LPMS_ERR (open_input_err , "Unable to find input info" );
346
- if (params -> transmuxe == 0 ) {
347
- ret = open_video_decoder (params , ctx );
348
- if (ret < 0 ) LPMS_ERR (open_input_err , "Unable to open video decoder" )
349
- ret = open_audio_decoder (params , ctx );
350
- if (ret < 0 ) LPMS_ERR (open_input_err , "Unable to open audio decoder" )
351
- ctx -> last_frame_v = av_frame_alloc ();
352
- if (!ctx -> last_frame_v ) LPMS_ERR (open_input_err , "Unable to alloc last_frame_v" );
353
- ctx -> last_frame_a = av_frame_alloc ();
354
- if (!ctx -> last_frame_a ) LPMS_ERR (open_input_err , "Unable to alloc last_frame_a" );
355
- }
346
+ if (params -> transmuxing ) return 0 ;
347
+ ret = open_video_decoder (params , ctx );
348
+ if (ret < 0 ) LPMS_ERR (open_input_err , "Unable to open video decoder" )
349
+ ret = open_audio_decoder (params , ctx );
350
+ if (ret < 0 ) LPMS_ERR (open_input_err , "Unable to open audio decoder" )
351
+ ctx -> last_frame_v = av_frame_alloc ();
352
+ if (!ctx -> last_frame_v ) LPMS_ERR (open_input_err , "Unable to alloc last_frame_v" );
353
+ ctx -> last_frame_a = av_frame_alloc ();
354
+ if (!ctx -> last_frame_a ) LPMS_ERR (open_input_err , "Unable to alloc last_frame_a" );
356
355
357
356
return 0 ;
358
357
0 commit comments