Can't decode remote video if resolution is higher than the configured?

SI
Saúl Ibarra Corretgé
Thu, Mar 5, 2020 1:38 PM

Hi there,

I'm running into a problem when the received video resolution is higher
than the one specified in the format.

Here is the scenario: PJSUA (the builtin app, I'm not using the API
myself) is configured to send and receive 720p video at 30fps (the codec
doesn't matter, the problem is the same).

The decoding channel is initially created for 720p resolution (according
to the logs) but quickly after the call is established a format change
event is received, changing the resolution to 1080p.

Then the logs start getting flooded with errors due to the decoding
buffer being to small:
https://gist.github.com/saghul/8943666c4aef68c45683a6601251e9f7

I tried to trace this down and this is how far I got:

At this point I'm out of ideas, I think a converter should've been
created somewhere after the format change, but I can't find a way to fix
this.

Any help would be appreciated.

Cheers,

--
Saúl

Hi there, I'm running into a problem when the received video resolution is higher than the one specified in the format. Here is the scenario: PJSUA (the builtin app, I'm not using the API myself) is configured to send and receive 720p video at 30fps (the codec doesn't matter, the problem is the same). The decoding channel is initially created for 720p resolution (according to the logs) but quickly after the call is established a format change event is received, changing the resolution to 1080p. Then the logs start getting flooded with errors due to the decoding buffer being to small: https://gist.github.com/saghul/8943666c4aef68c45683a6601251e9f7 I tried to trace this down and this is how far I got: * Based on the error it looks like the value here should be higher: https://github.com/pjsip/pjproject/blob/fedc629c4a80d897927c28db74a2e2a77a6ab920/pjmedia/src/pjmedia/vid_conf.c#L322 * I tried multiplying it by 4 (just as a test) but then this assert blows: https://github.com/pjsip/pjproject/blob/fedc629c4a80d897927c28db74a2e2a77a6ab920/pjmedia/src/pjmedia/vid_conf.c#L1054 so it looks like the source and destination must matcch At this point I'm out of ideas, I *think* a converter should've been created somewhere after the format change, but I can't find a way to fix this. Any help would be appreciated. Cheers, -- Saúl