Skip to content

Commit a2ddd30

Browse files
ast261Flole998
authored andcommitted
transcoding: access the codec name only when codec pointer is valid
this fixes #1635
1 parent b915870 commit a2ddd30

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/transcoding/transcode

src/transcoding/transcode/log.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
#define tvh_context_log(self, level, fmt, ...) \
5959
do { \
6060
tvh_stream_log((self)->stream, (level), "[%s => %s]: " fmt, \
61-
((self)->iavctx) ? (self)->iavctx->codec->name : "<unknown>", \
62-
((self)->oavctx) ? (self)->oavctx->codec->name : "<unknown>", \
61+
((self)->iavctx && (self)->iavctx->codec) ? (self)->iavctx->codec->name : "<unknown>", \
62+
((self)->oavctx && (self)->oavctx->codec) ? (self)->oavctx->codec->name : "<unknown>", \
6363
##__VA_ARGS__); \
6464
} while (0)
6565

0 commit comments

Comments
 (0)